Skip to content

Commit

Permalink
Merge pull request #19464 from Snuffleupagus/autolinking-catch
Browse files Browse the repository at this point in the history
Catch and ignore any errors during auto-linking parsing (PR 19110 follow-up)
  • Loading branch information
Snuffleupagus authored Feb 11, 2025
2 parents e3cca6d + 357ff4a commit e2d2263
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions web/pdf_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1112,12 +1112,17 @@ class PDFPageView {
await this.#renderAnnotationLayer();

if (this.#enableAutoLinking) {
await textLayerPromise;
this.annotationLayer?.injectLinkAnnotations({
inferredLinks: Autolinker.processLinks(this),
viewport: this.viewport,
structTreeLayer: this.structTreeLayer,
});
try {
await textLayerPromise;

this.annotationLayer?.injectLinkAnnotations({
inferredLinks: Autolinker.processLinks(this),
viewport: this.viewport,
structTreeLayer: this.structTreeLayer,
});
} catch (ex) {
console.error("enableAutoLinking:", ex);
}
}
}

Expand Down

0 comments on commit e2d2263

Please sign in to comment.