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:
Abe Jellinek 2025-08-05 11:17:03 -04:00
parent 2c7475a5e6
commit cc3fc42b0a

View file

@ -187,7 +187,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
}
// Prepare Fluent data
let ftl = [];