Skip to content

Commit b6849b2

Browse files
committed
Fix warning on empty pageRanges
Closes #1068
1 parent 361a9be commit b6849b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/qz/printer/action/PrintPDF.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ public void parseData(JSONArray printData, PrintOptions options) throws JSONExce
8787
if (!dataOpt.isNull("pageRanges")) {
8888
String[] ranges = dataOpt.optString("pageRanges", "").split(",");
8989
for(String range : ranges) {
90+
range = range.trim();
91+
if(range.isEmpty()) {
92+
continue;
93+
}
9094
String[] period = range.split("-");
9195

9296
try {

0 commit comments

Comments
 (0)