mirror of
https://github.com/zotero/zotero.git
synced 2026-09-28 01:31:40 +00:00
Migrate Promise#isPending() in zotero.js
This commit is contained in:
parent
37a6e0a61f
commit
4a1ca8ea96
1 changed files with 4 additions and 4 deletions
|
|
@ -202,6 +202,9 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
|
|||
this.initializationPromise = this.initializationDeferred.promise;
|
||||
this.uiReadyDeferred = Zotero.Promise.defer();
|
||||
this.uiReadyPromise = this.uiReadyDeferred.promise;
|
||||
this.uiReadyPromise.then(() => {
|
||||
Zotero.debug("User interface ready in " + (new Date() - _startupTime) + " ms");
|
||||
});
|
||||
|
||||
if (options) {
|
||||
let opts = [
|
||||
|
|
@ -442,10 +445,7 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
|
|||
|
||||
|
||||
this.uiIsReady = function () {
|
||||
if (this.uiReadyPromise.isPending()) {
|
||||
Zotero.debug("User interface ready in " + (new Date() - _startupTime) + " ms");
|
||||
this.uiReadyDeferred.resolve();
|
||||
}
|
||||
this.uiReadyDeferred.resolve();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue