mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fixed some linting issues
* added some semicolons * removed double parsing of ```err.stack``` into ```var stack```
This commit is contained in:
parent
dfa077fd5f
commit
d5bdc1600b
@ -42,7 +42,7 @@ module.exports = function(RED) {
|
||||
if (type === 'object') {
|
||||
type = Buffer.isBuffer(msg)?'Buffer':(util.isArray(msg)?'Array':'Date');
|
||||
}
|
||||
node.error(RED._("function.error.non-message-returned",{ type: type }))
|
||||
node.error(RED._("function.error.non-message-returned",{ type: type }));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -203,9 +203,9 @@ module.exports = function(RED) {
|
||||
if (util.hasOwnProperty('promisify')) {
|
||||
sandbox.setTimeout[util.promisify.custom] = function(after, value) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
sandbox.setTimeout(function(){ resolve(value) }, after);
|
||||
sandbox.setTimeout(function(){ resolve(value); }, after);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
var context = vm.createContext(sandbox);
|
||||
try {
|
||||
@ -241,7 +241,6 @@ module.exports = function(RED) {
|
||||
|
||||
var line = 0;
|
||||
var errorMessage;
|
||||
var stack = err.stack.split(/\r?\n/);
|
||||
if (stack.length > 0) {
|
||||
while (line < stack.length && stack[line].indexOf("ReferenceError") !== 0) {
|
||||
line++;
|
||||
@ -265,13 +264,13 @@ module.exports = function(RED) {
|
||||
});
|
||||
this.on("close", function() {
|
||||
while (node.outstandingTimers.length > 0) {
|
||||
clearTimeout(node.outstandingTimers.pop())
|
||||
clearTimeout(node.outstandingTimers.pop());
|
||||
}
|
||||
while (node.outstandingIntervals.length > 0) {
|
||||
clearInterval(node.outstandingIntervals.pop())
|
||||
clearInterval(node.outstandingIntervals.pop());
|
||||
}
|
||||
this.status({});
|
||||
})
|
||||
});
|
||||
} catch(err) {
|
||||
// eg SyntaxError - which v8 doesn't include line number information
|
||||
// so we can't do better than this
|
||||
@ -280,4 +279,4 @@ module.exports = function(RED) {
|
||||
}
|
||||
RED.nodes.registerType("function",FunctionNode);
|
||||
RED.library.register("functions");
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user