private JSFunction parseScript(boolean isstatic) {
JSFunction thisscript = null;
try {
- thisscript = JS.parse(t.fileName + (isstatic ? "._" : ""), t.content_start, new StringReader(t.content.toString()));
+ String contentString = t.content.toString();
+ if (contentString.trim().length() > 0)
+ thisscript = JS.parse(t.fileName + (isstatic ? "._" : ""), t.content_start, new StringReader(contentString));
} catch (IOException ioe) {
if (Log.on) Log.log(this, " ERROR: " + ioe.getMessage());
thisscript = null;