1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #19464 from Snuffleupagus/autolinking-catch

Catch and ignore any errors during auto-linking parsing (PR 19110 follow-up)
This commit is contained in:
Jonas Jenwald 2025-02-11 20:06:33 +01:00 committed by GitHub
commit e2d2263788
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}
}
}