Skip to content

Commit

Permalink
Remove special case if
Browse files Browse the repository at this point in the history
  • Loading branch information
LuKks committed Aug 8, 2023
1 parent b7d67ff commit 1241013
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,9 @@ class TreeNode {
else s = mid + 1
}

if (this.keys.length === 0) {
if (cas && !(await cas(null, node))) {
this.changed = false
return true
}
if (cas && !(await cas(null, node))) {
this.changed = false
return true
}

const i = c < 0 ? e : s
Expand Down

0 comments on commit 1241013

Please sign in to comment.