Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bibliographyTest breakage after d5cf33a
d5cf33a adds a `yield` to bibliography.js, which runs in modal windows (e.g., Create Bib), but there's a weird interaction between Bluebird and modal dialogs that can result in hangs -- presumably something to do with things being queued on the event loop but the modal dialog preventing other code from running? This was breaking bibliographyTest, but it seemed to work fine for me in normal usage, waiting properly for a running styles initialization to finish. It's possible this problem is limited to tests, but in the past, at least, I apparently decided that this was a general problem with `yield` in modal dialogs [1]. (See also: [2].) In any case, calling `yield Zotero.Styles.init()` from the Create Bib window was hanging the test, so for now do a synchronous check for style initialization to avoid it, and we should make sure that `yield` actually works in other contexts. [1] zotero@99dd1c069776 [2] zotero@c2dd531cec4
- Loading branch information