diff --git a/npm/oxlint/bin/oxlint b/npm/oxlint/bin/oxlint index 6d6ae5130..80d1a716e 100755 --- a/npm/oxlint/bin/oxlint +++ b/npm/oxlint/bin/oxlint @@ -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(