Skip to content

Commit

Permalink
Merge pull request #3187 from 0o001/main
Browse files Browse the repository at this point in the history
isInt function refactoring
  • Loading branch information
wobba authored Aug 11, 2023
2 parents 3746645 + 7cb49e8 commit 35a668d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions search-parts/src/helpers/LocalizationHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class LocalizationHelper {

private static isInt(value: any): boolean {
const x = parseFloat(value);
return !isNaN(value) && (x | 0) === x;
return Number.isInteger(x);
}

/**
Expand All @@ -92,4 +92,4 @@ class LocalizationHelper {
}
}

export default LocalizationHelper;
export default LocalizationHelper;

0 comments on commit 35a668d

Please sign in to comment.