1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Be sure that CalculationOrder is either null or a non-empty array

This commit is contained in:
Calixte Denizet 2020-12-10 16:02:11 +01:00
parent b194c820bf
commit 25bf504ff5
3 changed files with 13 additions and 2 deletions

View file

@ -1050,6 +1050,9 @@ class PDFDocument {
}
const ids = calculationOrder.filter(isRef).map(ref => ref.toString());
if (ids.length === 0) {
return shadow(this, "calculationOrderIds", null);
}
return shadow(this, "calculationOrderIds", ids);
}
}