mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
server: Fix build errors
This commit is contained in:
parent
0ec3232c81
commit
bafc556b00
@ -46,8 +46,8 @@ class OrderByAndLimitExp extends Expression {
|
||||
|
||||
notes.sort((a, b) => {
|
||||
for (const {valueExtractor, smaller, larger} of this.orderDefinitions) {
|
||||
let valA = valueExtractor.extract(a);
|
||||
let valB = valueExtractor.extract(b);
|
||||
let valA: string | number | Date | null = valueExtractor.extract(a);
|
||||
let valB: string | number | Date | null = valueExtractor.extract(b);
|
||||
|
||||
if (valA === undefined) {
|
||||
valA = null;
|
||||
@ -108,7 +108,7 @@ class OrderByAndLimitExp extends Expression {
|
||||
}
|
||||
|
||||
isDate(date: number | string) {
|
||||
return (new Date(date) !== "Invalid Date") && !isNaN(new Date(date));
|
||||
return !isNaN(new Date(date).getTime());
|
||||
}
|
||||
|
||||
isNumber(x: number | string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user