From 7304a0a7bc70b52e3294dcd911bf982cda6158b6 Mon Sep 17 00:00:00 2001 From: Coder of Salvation / Leon van Kammen Date: Tue, 14 Mar 2017 23:09:45 +0100 Subject: [PATCH 1/2] modified 2 'new Error'-occurences to 'throw new Error' (so it becomes catchable, like the other) --- Store.es6.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 { From bb548f5be7817fdae4147db1ff4bf8f9b8c97cb6 Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 28 May 2020 21:09:28 +0200 Subject: [PATCH 2/2] added sponsor-button --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml 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