mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Cleanup KnockoutJS
This commit is contained in:
parent
4c7ce61bc0
commit
4142526ba6
9 changed files with 121 additions and 279 deletions
7
vendors/knockout/src/tasks.js
vendored
7
vendors/knockout/src/tasks.js
vendored
|
|
@ -24,8 +24,9 @@ ko.tasks = (() => {
|
|||
if (nextIndexToProcess > mark) {
|
||||
if (++countMarks >= 5000) {
|
||||
nextIndexToProcess = taskQueueLength; // skip all tasks remaining in the queue since any of them could be causing the recursion
|
||||
setTimeout(() =>
|
||||
throw Error(`'Too much recursion' after processing ${countMarks} task groups.`), 0)
|
||||
setTimeout(() => {
|
||||
throw Error(`'Too much recursion' after processing ${countMarks} task groups.`)
|
||||
}, 0)
|
||||
break;
|
||||
}
|
||||
mark = taskQueueLength;
|
||||
|
|
@ -33,7 +34,7 @@ ko.tasks = (() => {
|
|||
try {
|
||||
task();
|
||||
} catch (ex) {
|
||||
setTimeout(() => throw ex, 0);
|
||||
setTimeout(() => { throw ex }, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue