diff --git a/build/azure-pipelines/publish-types/check-version.ts b/build/azure-pipelines/publish-types/check-version.ts index 2c730889112fa..137e535353a4c 100644 --- a/build/azure-pipelines/publish-types/check-version.ts +++ b/build/azure-pipelines/publish-types/check-version.ts @@ -35,9 +35,9 @@ function isValidTag(t: string) { return false; } - if (parseInt(major, 10) === NaN || parseInt(minor, 10) === NaN) { + if (isNaN(parseInt(major, 10)) || isNaN(parseInt(minor, 10))) { return false; } return true; -} \ No newline at end of file +}