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

Avoid to display an alert or a confirm dialog if the message is empty

It fixes #19171.
This commit is contained in:
Calixte Denizet 2024-12-05 21:03:54 +01:00
parent f180de41f3
commit d1db8d6294
2 changed files with 49 additions and 0 deletions

View file

@ -447,6 +447,9 @@ class App extends PDFObject {
cMsg = cMsg.cMsg;
}
cMsg = (cMsg || "").toString();
if (!cMsg) {
return 0;
}
nType =
typeof nType !== "number" || isNaN(nType) || nType < 0 || nType > 3
? 0