Fixed crawler not reading and comparing all RERequest results
This commit is contained in:
11
index.js
11
index.js
@@ -167,3 +167,14 @@ var rule = new schedule.RecurrenceRule();
|
||||
await processNotifications();
|
||||
console.log(new Date(), 'Notification service finished');
|
||||
});
|
||||
|
||||
/**
|
||||
* Add flat method to Array
|
||||
*/
|
||||
Object.defineProperty(Array.prototype, 'flat', {
|
||||
value: function(depth = 1) {
|
||||
return this.reduce(function (flat, toFlatten) {
|
||||
return flat.concat((Array.isArray(toFlatten) && (depth>1)) ? toFlatten.flat(depth-1) : toFlatten);
|
||||
}, []);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user