mirror of
https://github.com/zotero/zotero.git
synced 2026-09-17 23:51:18 +00:00
Mirror of https://github.com/zotero/zotero.git
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. |
||
|---|---|---|
| chrome | ||
| components | ||
| defaults/preferences | ||
| resource | ||
| styles@188e5914c7 | ||
| test | ||
| translators@daa1a05939 | ||
| .gitmodules | ||
| .travis.yml | ||
| chrome.manifest | ||
| COPYING | ||
| install.rdf | ||
| README.md | ||
| update.rdf | ||
Zotero
Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
For more information on how to use this source code, see the Zotero wiki.