Skip to content

Commit ce5430d

Browse files
committed
Protect against jsFS callback error argument being undefined
1 parent d54ca66 commit ce5430d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/natives/src/syscall/fs_js.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func fsCall(name string, args ...interface{}) (js.Value, error) {
2323
var res callResult
2424

2525
if len(args) >= 1 {
26-
if jsErr := args[0]; !jsErr.IsNull() {
26+
if jsErr := args[0]; !jsErr.IsUndefined() && !jsErr.IsNull() {
2727
res.err = mapJSError(jsErr)
2828
}
2929
}

0 commit comments

Comments
 (0)