Skip to content

Commit f02e3cf

Browse files
committed
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

+1-1
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)