1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Remove unnecessary check from PDFLinkService.goToDestination (PR 17984 follow-up)

After the changes in PR 17984 this code can no longer be reached, since the destination is now validated on the worker-thread.
This commit is contained in:
Jonas Jenwald 2024-04-25 10:10:00 +02:00
parent f6cd03955b
commit 150964dd6d

View file

@ -171,11 +171,6 @@ class PDFLinkService {
}
} else if (Number.isInteger(destRef)) {
pageNumber = destRef + 1;
} else {
console.error(
`goToDestination: "${destRef}" is not a valid destination reference, for dest="${dest}".`
);
return;
}
if (!pageNumber || pageNumber < 1 || pageNumber > this.pagesCount) {
console.error(