Skip to content

Commit

Permalink
Use Symbol for default document loader key.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlehn committed May 31, 2024
1 parent 0664018 commit f02e3cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jsonld.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const RESOLVED_CONTEXT_CACHE_MAX_SIZE = 100;
// resources are cleaned up with WeakMap semantics for the documentLoaders
const _resolvedContextCaches = new WeakMap();
// default key to use when no documentLoader used
const _defaultDocumentLoaderKey = {};
const _defaultDocumentLoaderKey = Symbol();

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

0 comments on commit f02e3cf

Please sign in to comment.