Skip to content

Commit

Permalink
fix: no key should return all entries (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs authored Sep 13, 2023
1 parent e63729c commit e1b791b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e1b791b

Please sign in to comment.