Skip to content

Commit 0b238ae

Browse files
committed
Attempt fixing JS
1 parent 72a35a4 commit 0b238ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib/crypto/kimchi_bindings/js/node_js/node_backend.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ var wasm_ready = function(wasm) {
3434
wasm.wbg_rayon_start_worker(worker_threads.workerData.receiver);
3535
};
3636

37+
// This function was previously exported by JSOO but was removed.
38+
// It is now copied here.
39+
// Provides: caml_js_export_var
40+
function caml_js_export_var (){
41+
if(typeof module !== 'undefined' && module && module.exports)
42+
return module.exports
43+
else
44+
return globalThis;
45+
}
46+
3747
// Provides: startWorkers
3848
// Requires: worker_threads, _workers, caml_js_export_var
3949
var startWorkers = (function() {

0 commit comments

Comments
 (0)