cspell-trie-lib
Advanced tools
Comparing version 4.1.4 to 4.1.5
@@ -33,3 +33,3 @@ "use strict"; | ||
const orig = n; | ||
n = Object.isFrozen(n) ? Object.assign({}, n) : n; | ||
n = Object.isFrozen(n) ? Object.assign(Object.assign({}, n), { c: n.c && new Map(n.c) }) : n; | ||
if (n.c) { | ||
@@ -43,4 +43,8 @@ const children = [...n.c].sort((a, b) => a[0] < b[0] ? -1 : 1); | ||
knownMap.set(orig, ref); | ||
if (!cached.has(ref)) { | ||
cached.set(ref, count++); | ||
} | ||
return ref; | ||
} | ||
Object.freeze(n); | ||
signatures.set(sig, n); | ||
@@ -68,3 +72,3 @@ cached.set(n, count++); | ||
if (ref) { | ||
if (!cached.has(ref) && ref !== n) { | ||
if (!cached.has(ref)) { | ||
cached.set(ref, count++); | ||
@@ -71,0 +75,0 @@ } |
{ | ||
"name": "cspell-trie-lib", | ||
"version": "4.1.4", | ||
"version": "4.1.5", | ||
"description": "Trie Data Structure to support cspell.", | ||
@@ -59,3 +59,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "92b46011da8467d15c7969aab4572a8639e3f685" | ||
"gitHead": "9682c2d23fabc9e823cbd5d610fe590feac78ac2" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73384
1965