diff --git a/lib/bcoin/lru.js b/lib/bcoin/lru.js index 160b995b..80028525 100644 --- a/lib/bcoin/lru.js +++ b/lib/bcoin/lru.js @@ -139,9 +139,6 @@ LRU.prototype.reset = function reset() { LRU.prototype.set = function set(key, value) { var item; - if (value === undefined) - throw new Error('Cannot set value to undefined.'); - key = key + ''; item = this.data[key]; @@ -196,7 +193,7 @@ LRU.prototype.get = function get(key) { */ LRU.prototype.has = function get(key) { - return this.data[key] !== undefined; + return this.data[key] != null; }; /**