We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 815c248 commit 8ccdae9Copy full SHA for 8ccdae9
lib/trie.js
@@ -75,6 +75,11 @@ URLTrie.prototype.remove = function (path) {
75
}
76
var part = path.shift();
77
var child = this.branches[part];
78
+ if (child === undefined) {
79
+ // Requested node doesn't exist,
80
+ // consider it already removed.
81
+ return;
82
+
83
child.remove(path);
84
if (child.size === 0 && child.data === undefined) {
85
// child has no branches and is not a leaf
0 commit comments