emscripten-core / emscripten-core/emscripten

MODULARIZE=1 adds code incompatible with MIN_NODE_VERSION=101900

Open
#21,917 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Hi! Using emscripten v3.1.59, here are the two lines at the very beginning that should be fixed:
``` javascript
var _scriptName = typeof document != 'undefined' ? document.currentScript?.src : undefined;
if (typeof __filename != 'undefined') _scriptName ||= __filename;
```
The optional chaining operator (`?.`) and the logical OR assignment (`||=`) are only available in newer versions of NodeJS.
Those two lines are added by `-sMODULARIZE=1`.
Thanks a lot for the fix!
Kind regards,
Maurice

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.