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."); } /**