mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
fix DB setup
This commit is contained in:
@@ -259,6 +259,22 @@ function timeLimit(promise, limitMs) {
|
||||
});
|
||||
}
|
||||
|
||||
function deferred() {
|
||||
return (() => {
|
||||
let resolve, reject;
|
||||
|
||||
let promise = new Promise((res, rej) => {
|
||||
resolve = res;
|
||||
reject = rej;
|
||||
});
|
||||
|
||||
promise.resolve = resolve;
|
||||
promise.reject = reject;
|
||||
|
||||
return promise;
|
||||
})();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
randomSecureToken,
|
||||
randomString,
|
||||
@@ -290,5 +306,6 @@ module.exports = {
|
||||
getNoteTitle,
|
||||
removeTextFileExtension,
|
||||
formatDownloadTitle,
|
||||
timeLimit
|
||||
timeLimit,
|
||||
deferred
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user