misc/wasm: incorrectly checks for require("fs") validity #40446
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
When loaded,
wasm_exec.js
tries to know on which platform it is run. "fs" is loaded if not already available and check if it is empty (when using webpack to provide an empty implementation) or not (when running inside node). The check is wrongly implemented asObject.keys
returns an array of key, not a count, thus making that check always true, and unable to use with webpack.The line in question
go/misc/wasm/wasm_exec.js
Line 31 in c4fed25
Which can be easily fixed by adding a
.length
after theObject.keys(fs)
.The text was updated successfully, but these errors were encountered: