1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix lint errors in editor hooks

This commit is contained in:
Nick O'Leary 2021-05-13 14:00:21 +01:00
parent 1550e5343c
commit fdf58e1225
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -87,7 +87,7 @@ RED.hooks = (function() {
}
function callNextHook(err) {
if (!hookItem || err) {
if (done) { done(err) };
if (done) { done(err) }
return err;
}
if (hookItem.removed) {
@ -100,15 +100,15 @@ RED.hooks = (function() {
let result = callback(payload);
if (result === false) {
// Halting the flow
if (done) { done(false) };
if (done) { done(false) }
return result;
}
hookItem = hookItem.nextHook;
return callNextHook();
} catch(err) {
console.warn(err);
if (done) { done(err);}
return err;
} catch(e) {
console.warn(e);
if (done) { done(e);}
return e;
}
} else {
// There is a done callback
@ -118,13 +118,13 @@ RED.hooks = (function() {
hookItem = hookItem.nextHook;
callNextHook();
} else {
if (done) { done(result)};
if (done) { done(result)}
}
})
} catch(err) {
console.warn(err);
if (done) { done(err) };
return err;
} catch(e) {
console.warn(e);
if (done) { done(e) }
return e;
}
}
}