Skip to content

Commit 3f0940a

Browse files
committed
fix(cli.js): SyntaxError: Unexpected token '?' in cli.js
fix #373
1 parent d99ecec commit 3f0940a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- fix return type of `lua()` / `executeLua()`
66
- strengthen some error handling
7+
- fix: SyntaxError: Unexpected token '?' in cli.js #373
78

89
## [5.1.0](https://github.com/neovim/node-client/compare/v4.11.0...v5.1.0)
910

packages/neovim/bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if (args[0] === '--version') {
1515

1616
// "21.6.1" => "21"
1717
const nodeMajorVersionStr = process.versions.node.replace(/\..*/, '')
18-
const nodeMajorVersion = Number.parseInt(nodeMajorVersionStr ?? '0')
18+
const nodeMajorVersion = Number.parseInt(nodeMajorVersionStr ? nodeMajorVersionStr : '0')
1919

2020
if (
2121
process.env.NVIM_NODE_HOST_DEBUG &&

0 commit comments

Comments
 (0)