1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Introduce some logical assignment in the src/core/ folder

This commit is contained in:
Jonas Jenwald 2022-07-17 11:24:05 +02:00
parent 317abd6d07
commit d950b91c4e
20 changed files with 62 additions and 103 deletions

View file

@ -137,10 +137,7 @@ function getInheritableProperty({
if (stopWhenFound) {
return value;
}
if (!values) {
values = [];
}
values.push(value);
(values ||= []).push(value);
}
dict = dict.get("Parent");
}
@ -322,7 +319,7 @@ function _collectJS(entry, xref, list, parents) {
} else if (typeof js === "string") {
code = js;
}
code = code && stringToPDFString(code).replaceAll("\x00", "");
code &&= stringToPDFString(code).replaceAll("\x00", "");
if (code) {
list.push(code);
}