From ad7ef10343dcdbf20a07d2d5fb3e4bf8794db061 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 3 Apr 2016 03:05:08 -0700 Subject: [PATCH] fix implicit global var in bst. --- lib/bcoin/bst.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bcoin/bst.js b/lib/bcoin/bst.js index a11aa418..2241df99 100644 --- a/lib/bcoin/bst.js +++ b/lib/bcoin/bst.js @@ -139,17 +139,17 @@ BST.prototype.remove = function remove(key, options) { if (!current.left || !current.right) { if (current.left) - child = current.left; + current = current.left; else - child = current.right; + current = current.right; if (!parent) { - this.root = child; + this.root = current; } else { if (left) - parent.left = child; + parent.left = current; else - parent.right = child; + parent.right = current; } return true;