fix microbench when microbench.txt is missing (#246)
This commit is contained in:
parent
35b7b3c379
commit
3dd93eb4e4
1 changed files with 4 additions and 3 deletions
|
@ -1134,11 +1134,12 @@ function load_result(filename)
|
|||
if (typeof std !== "undefined") {
|
||||
// read the file in QuickJS
|
||||
var f = std.open(filename, "r");
|
||||
if (!f) {
|
||||
if (f) {
|
||||
str = f.readAsString();
|
||||
f.close();
|
||||
} else {
|
||||
has_error = true;
|
||||
}
|
||||
str = f.readAsString();
|
||||
f.close();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue