mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(npm): SyntaxError caused by optional chaining in low version node (#4650)
fix: #4602
This commit is contained in:
parent
649e7c30cf
commit
0fba73897c
1 changed files with 6 additions and 1 deletions
|
|
@ -90,7 +90,12 @@ const PLATFORMS = {
|
|||
},
|
||||
};
|
||||
|
||||
let binPath = PLATFORMS[platform]?.[arch]?.[isMusl() ? "musl" : "gnu"];
|
||||
let binPath = (
|
||||
PLATFORMS &&
|
||||
PLATFORMS[platform] &&
|
||||
PLATFORMS[platform][arch] &&
|
||||
PLATFORMS[platform][arch][isMusl() ? "musl" : "gnu"]
|
||||
) || null;
|
||||
|
||||
if (binPath) {
|
||||
const result = require("child_process").spawnSync(
|
||||
|
|
|
|||
Loading…
Reference in a new issue