Merge remote-tracking branch 'origin/stable'

# Conflicts:
#	src/services/options_init.js
This commit is contained in:
zadam
2020-07-28 23:50:54 +02:00
3 changed files with 9 additions and 3 deletions

View File

@@ -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);
});