diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f744573 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: https://gumroad.com/l/hGYGh diff --git a/Store.es6.js b/Store.es6.js index f79c977..8190a45 100644 --- a/Store.es6.js +++ b/Store.es6.js @@ -160,7 +160,7 @@ const get = function(id, cb) { const done = function (err, o) { let e, item; if (err) { - const e = new Error("could not load data"); + const e = throw new Error("could not load data"); if (typeof cb === "function") { return cb(e); } else { @@ -169,7 +169,7 @@ const get = function(id, cb) { } item = this._single ? o[id] : o; if (typeof item !== "object") { - e = new Error("could not load data"); + e = throw new Error("could not load data"); if (typeof cb === "function") { return cb(e); } else {