mirror of
https://github.com/zotero/zotero.git
synced 2026-09-16 23:41:08 +00:00
If a view or other resources are destroyed while a promise is being resolved, subsequent code can fail. This is generally harmless, but it results in unnecessary errors being logged to the console. To address this, promises can use a new function, Zotero.Promise.check(), to test whether a value is truthy or 0 and automatically throw a specific error that's ignored by the unhandled rejection handler if not. Example usage: getAsync().tap(() => Zotero.Promise.check(this.win)); If this.win is cleaned up while getAsync() is being resolved, subsequent lines won't be run, and nothing will be logged to the console. |
||
|---|---|---|
| .. | ||
| schema | ||
| tinymce | ||
| bluebird.js | ||
| concurrent-caller.js | ||
| config.js | ||
| csl-validator.js | ||
| hide.vbs | ||
| pathparser.js | ||
| redirect.sh | ||
| redirect.vbs | ||