Catch BlockingObserver error when reader is closed immediately
https://forums.zotero.org/discussion/125841/cannot-open-a-pdf-file-in-a-new-tab
This commit is contained in:
parent
76c0c9d0ce
commit
75ce9f07b7
1 changed files with 7 additions and 1 deletions
|
@ -183,7 +183,13 @@ class ReaderInstance {
|
|||
return uri.scheme === 'http' || uri.scheme === 'https';
|
||||
}
|
||||
});
|
||||
this._blockingObserver.register(this._iframe);
|
||||
try {
|
||||
this._blockingObserver.register(this._iframe);
|
||||
}
|
||||
catch {
|
||||
// Reader was closed before it could be initialized
|
||||
// No need to log this
|
||||
}
|
||||
|
||||
this._internalReader = this._iframeWindow.wrappedJSObject.createReader(Components.utils.cloneInto({
|
||||
type: this._type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue