diff --git a/src/node-server/npm-server-preflight.ts b/src/node-server/npm-server-preflight.ts index 0028de06f62..ae7832e7065 100644 --- a/src/node-server/npm-server-preflight.ts +++ b/src/node-server/npm-server-preflight.ts @@ -45,7 +45,7 @@ export function runNpmServerPreflight(argv: string[]): void { function readExpectedVersion(argv: string[]): string { const flagIndex = argv.indexOf('--expected-version') - const value = flagIndex >= 0 ? argv[flagIndex + 1] : undefined + const value = flagIndex !== -1 ? argv[flagIndex + 1] : undefined if (!value || !isExactNpmVersion(value)) { throw new Error('npm_preflight_expected_version_required') }