mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
Merge remote-tracking branch 'origin/stable'
# Conflicts: # src/services/options_init.js
This commit is contained in:
@@ -238,6 +238,9 @@ function getNoteTitle(filePath, replaceUnderscoresWithSpaces, noteMeta) {
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@@ -250,7 +253,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