From ef16ed1d4b09a2ec78b7ae6c2e2064ee1a92feb8 Mon Sep 17 00:00:00 2001 From: Salakar Date: Wed, 20 Sep 2017 11:53:50 +0100 Subject: [PATCH] remove invalid return from thenable --- lib/modules/database/reference.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/modules/database/reference.js b/lib/modules/database/reference.js index 9c908585..d2268d45 100644 --- a/lib/modules/database/reference.js +++ b/lib/modules/database/reference.js @@ -488,16 +488,16 @@ export default class Reference extends ReferenceBase { return fnResolve(result); }, (possibleErr) => { this._promise = null; - + if (isFunction(fnReject)) { return fnReject(possibleErr); } - + throw possibleErr; }); } - return throw new Error("Cannot read property 'then' of undefined."); + throw new Error("Cannot read property 'then' of undefined."); } /** @@ -512,7 +512,7 @@ export default class Reference extends ReferenceBase { }); } - return throw new Error("Cannot read property 'catch' of undefined."); + throw new Error("Cannot read property 'catch' of undefined."); } /**