From f02e3cf7c7ea3b641e4616543159f440e1bbf5e7 Mon Sep 17 00:00:00 2001 From: "David I. Lehn" Date: Fri, 31 May 2024 16:22:47 -0400 Subject: [PATCH] Use Symbol for default document loader key. --- lib/jsonld.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jsonld.js b/lib/jsonld.js index 002715d5..3ab94ada 100644 --- a/lib/jsonld.js +++ b/lib/jsonld.js @@ -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}) {