🐛 Fix issue with very large interval values

This commit is contained in:
Jan Oberhauser 2021-08-01 21:45:44 +02:00
parent 597305945f
commit 7c94ee3cce

View file

@ -78,7 +78,13 @@ export class Interval implements INodeType {
this.emit([this.helpers.returnJsonArray([{}])]); this.emit([this.helpers.returnJsonArray([{}])]);
}; };
const intervalObj = setInterval(executeTrigger, intervalValue * 1000); intervalValue *= 1000;
if (intervalValue > Number.MAX_SAFE_INTEGER) {
throw new Error('The interval value is too large.');
}
const intervalObj = setInterval(executeTrigger, );
async function closeFunction() { async function closeFunction() {
clearInterval(intervalObj); clearInterval(intervalObj);