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:
commit
e2d2263788
@ -1112,12 +1112,17 @@ class PDFPageView {
|
|||||||
await this.#renderAnnotationLayer();
|
await this.#renderAnnotationLayer();
|
||||||
|
|
||||||
if (this.#enableAutoLinking) {
|
if (this.#enableAutoLinking) {
|
||||||
await textLayerPromise;
|
try {
|
||||||
this.annotationLayer?.injectLinkAnnotations({
|
await textLayerPromise;
|
||||||
inferredLinks: Autolinker.processLinks(this),
|
|
||||||
viewport: this.viewport,
|
this.annotationLayer?.injectLinkAnnotations({
|
||||||
structTreeLayer: this.structTreeLayer,
|
inferredLinks: Autolinker.processLinks(this),
|
||||||
});
|
viewport: this.viewport,
|
||||||
|
structTreeLayer: this.structTreeLayer,
|
||||||
|
});
|
||||||
|
} catch (ex) {
|
||||||
|
console.error("enableAutoLinking:", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user