diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cgo/test/test.go | 1 | ||||
-rw-r--r-- | misc/wasm/wasm_exec.js | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/misc/cgo/test/test.go b/misc/cgo/test/test.go index 35bc3a1447..05fa52b381 100644 --- a/misc/cgo/test/test.go +++ b/misc/cgo/test/test.go @@ -319,6 +319,7 @@ typedef enum { // issue 4339 // We've historically permitted #include <>, so test it here. Issue 29333. +// Also see issue 41059. #include <issue4339.h> // issue 4417 diff --git a/misc/wasm/wasm_exec.js b/misc/wasm/wasm_exec.js index 8501ae7cd8..ef97c4e311 100644 --- a/misc/wasm/wasm_exec.js +++ b/misc/wasm/wasm_exec.js @@ -11,6 +11,7 @@ // - Node.js // - Electron // - Parcel + // - Webpack if (typeof global !== "undefined") { // global already exists @@ -28,7 +29,7 @@ if (!global.fs && global.require) { const fs = require("fs"); - if (Object.keys(fs) !== 0) { + if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) { global.fs = fs; } } @@ -556,6 +557,7 @@ } if ( + typeof module !== "undefined" && global.require && global.require.main === module && global.process && |