From ef92070a28ff81e0ef0cc040a7292a141cc2c41c Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 5 Mar 2017 01:23:46 -0800 Subject: [PATCH] rbt: always return node for insert. --- lib/utils/rbt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/rbt.js b/lib/utils/rbt.js index 7bac2329..4b668e28 100644 --- a/lib/utils/rbt.js +++ b/lib/utils/rbt.js @@ -78,7 +78,7 @@ RBT.prototype.insert = function insert(key, value) { if (this.unique && cmp === 0) { current.key = key; current.value = value; - return; + return current; } parent = current;