From e1b791b83060216b00d0a40e63d2258a3aafdf1f Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju <88789928+saikumarrs@users.noreply.github.com> Date: Wed, 13 Sep 2023 14:34:04 +0530 Subject: [PATCH] fix: no key should return all entries (#45) --- src/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index a17eb0c..4bdaa22 100644 --- a/src/main.js +++ b/src/main.js @@ -67,7 +67,8 @@ Store.prototype = { return this; }, get: function (key) { - if (!key) { + // Return all entries if no key + if (key === undefined) { var ret = {}; this.forEach((key, val) => ret[key] = val); return ret;