Fix Snyk errors

This commit is contained in:
2023-02-21 14:53:51 +10:00
parent ca40db79f7
commit a25fc2e7e8
2 changed files with 3 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ export class SMDate {
}
} else if (
dateOrString instanceof Date &&
!isNaN(dateOrString.getTime())
!Number.isNaN(dateOrString.getTime())
) {
this.date = dateOrString;
}
@@ -223,7 +223,7 @@ export class SMDate {
}
if (
isNaN(date.getTime()) == false &&
Number.isNaN(date.getTime()) == false &&
checkYear == parsedYear &&
checkMonth == parsedMonth &&
checkDay == parsedDay &&

View File

@@ -57,7 +57,7 @@ export const isUUID = (uuid: string): boolean => {
* @returns {string} The bytes in human readable string.
*/
export const bytesReadable = (bytes: number): string => {
if (isNaN(bytes)) {
if (Number.isNaN(bytes)) {
return "0 Bytes";
}