Skip to content

Commit

Permalink
Fix invert method
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc committed Jul 1, 2020
1 parent a647133 commit 16a8145
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/radix/tree.ts
Expand Up @@ -61,7 +61,7 @@ function isSameKey(path: string, key: string): boolean {
kr.next();
}

return (!different) && (pr.current() === '/' || !pr.notDone());
return (!different) && (pr.current() === '/' || pr.done());
}

function checkParam(char: string): boolean {
Expand Down Expand Up @@ -95,7 +95,7 @@ function isSharedKey(path: string, key: string): boolean {
kr.next();
}

return (!different) && (!kr.notDone() || checkMarkers(kr.current()));
return (!different) && (kr.done() || checkMarkers(kr.current()));
}

function detectParamSize(reader: Reader) {
Expand Down Expand Up @@ -232,7 +232,7 @@ function innerFind<T>(
}
}

if (!(pr.notDone() || kr.notDone()) && node.payload) {
if (pr.done() && kr.done() && node.payload) {
useRadixResultNode(result, node);

return;
Expand Down

0 comments on commit 16a8145

Please sign in to comment.