Skip to content

Commit

Permalink
Get node mver without regex. NFC (emscripten-core#18738)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr authored Feb 15, 2023
1 parent 14f426d commit e0c513b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ if (ENVIRONMENT_IS_NODE) {
// not be needed with node v15 and about because it is now the default
// behaviour:
// See https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
var nodeMajor = process.version.match(/^v(\d+)\./)[1];
var nodeMajor = process.versions.node.split(".")[0];
if (nodeMajor < 15) {
process.on('unhandledRejection', function(reason) { throw reason; });
}
Expand Down

0 comments on commit e0c513b

Please sign in to comment.