forked from zotero/zotero
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compatibility fixes for Bluebird >=3.4.2
Before 3.4.2, `yield` in a Bluebird `coroutine()` released Zalgo if an already-resolved promise (e.g., from `Promise.resolve()`) was yielded, continuing immediately instead of on the next turn of the event loop. We apparently relied on that broken behavior in a few places, particularly from `Zotero.DB.waitForTransaction()`. All the transaction-queueing stuff probably needs to be reevaluated in general, but for now, mirror the previous possibly ill-advised behavior by checking explicitly for a transaction before yielding on `waitForTransaction()` (as well as the result of a 'load' event from `libraryTreeView`).
- Loading branch information
Showing
4 changed files
with
30 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters