Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f02e3cf

Browse files
committedMay 31, 2024
Use Symbol for default document loader key.
1 parent 0664018 commit f02e3cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/jsonld.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const RESOLVED_CONTEXT_CACHE_MAX_SIZE = 100;
105105
// resources are cleaned up with WeakMap semantics for the documentLoaders
106106
const _resolvedContextCaches = new WeakMap();
107107
// default key to use when no documentLoader used
108-
const _defaultDocumentLoaderKey = {};
108+
const _defaultDocumentLoaderKey = Symbol();
109109

110110
// make a ContextResolver using a per-documentLoader shared cache
111111
function _makeContextResolver({documentLoader = _defaultDocumentLoaderKey}) {

0 commit comments

Comments
 (0)
Please sign in to comment.