diff --git a/lib/index.js b/lib/index.js index 72ffbb7..38f3b08 100755 --- a/lib/index.js +++ b/lib/index.js @@ -149,8 +149,10 @@ internals.Yar = class { if (this._store._lazyKeys) { this._isLazy = true; // Default to lazy mode if previously set for (const key of this._store._lazyKeys) { - this[key] = this._store[key]; - delete this._store[key]; + if (key in this._store) { + this[key] = this._store[key]; + delete this._store[key]; + } } } }