mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
CKEditor 21
This commit is contained in:
@@ -328,6 +328,9 @@ function dynamicRequire(moduleName) {
|
||||
}
|
||||
|
||||
function timeLimit(promise, limitMs) {
|
||||
// better stack trace if created outside of promise
|
||||
const error = new Error('Process exceeded time limit ' + limitMs);
|
||||
|
||||
return new Promise((res, rej) => {
|
||||
let resolved = false;
|
||||
|
||||
@@ -339,7 +342,7 @@ function timeLimit(promise, limitMs) {
|
||||
|
||||
setTimeout(() => {
|
||||
if (!resolved) {
|
||||
rej(new Error('Process exceeded time limit ' + limitMs));
|
||||
rej(error);
|
||||
}
|
||||
}, limitMs);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user