Don't return null

pull/123/head
FongMi 3 years ago
parent ee72ad14cc
commit 61434c4995
  1. 4
      drpy/src/main/java/com/hiker/drpy/method/Global.java

@ -88,7 +88,7 @@ public class Global {
try {
return ctx.parseJSON(new Gson().toJson(parser.pdfa(html, rule)));
} catch (Exception e) {
return null;
return ctx.createNewJSObject();
}
}
@ -108,7 +108,7 @@ public class Global {
try {
return ctx.parseJSON(new Gson().toJson(parser.pdfl(html, rule, texts, urls, urlKey)));
} catch (Exception e) {
return null;
return ctx.createNewJSObject();
}
}

Loading…
Cancel
Save