From edd25a347bd6c04806f84767b57f1983bd9cf3db Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 29 Dec 2020 13:44:12 +0100 Subject: [PATCH] Moved line --- loopback/common/models/vn-model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js index 56fb7e656..cc3eede8e 100644 --- a/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -145,10 +145,10 @@ module.exports = function(Self) { rewriteDbError(replaceErrFunc) { function replaceErr(err, replaceErrFunc) { if (Array.isArray(err)) { - let errs = []; const errors = err.filter(error => { return error != undefined && error != null; }); + let errs = []; for (let e of errors) { if (!(e instanceof UserError)) errs.push(replaceErrFunc(e));