server: Fix build errors

This commit is contained in:
Elian Doran 2024-10-11 19:45:54 +03:00
parent 0ec3232c81
commit bafc556b00
No known key found for this signature in database

View File

@ -46,8 +46,8 @@ class OrderByAndLimitExp extends Expression {
notes.sort((a, b) => { notes.sort((a, b) => {
for (const {valueExtractor, smaller, larger} of this.orderDefinitions) { for (const {valueExtractor, smaller, larger} of this.orderDefinitions) {
let valA = valueExtractor.extract(a); let valA: string | number | Date | null = valueExtractor.extract(a);
let valB = valueExtractor.extract(b); let valB: string | number | Date | null = valueExtractor.extract(b);
if (valA === undefined) { if (valA === undefined) {
valA = null; valA = null;
@ -108,7 +108,7 @@ class OrderByAndLimitExp extends Expression {
} }
isDate(date: number | string) { isDate(date: number | string) {
return (new Date(date) !== "Invalid Date") && !isNaN(new Date(date)); return !isNaN(new Date(date).getTime());
} }
isNumber(x: number | string) { isNumber(x: number | string) {