mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
handle undefined in the search ordering
This commit is contained in:
10386
package-lock.json
generated
10386
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -80,7 +80,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "7.0.3",
|
||||
"electron": "13.0.0-beta.17",
|
||||
"electron": "13.0.0-beta.18",
|
||||
"electron-builder": "22.10.5",
|
||||
"electron-packager": "15.2.0",
|
||||
"electron-rebuild": "2.3.5",
|
||||
|
||||
@@ -28,6 +28,14 @@ class OrderByAndLimitExp extends Expression {
|
||||
let valA = valueExtractor.extract(a);
|
||||
let valB = valueExtractor.extract(b);
|
||||
|
||||
if (valA === undefined) {
|
||||
valA = null;
|
||||
}
|
||||
|
||||
if (valB === undefined) {
|
||||
valB = null;
|
||||
}
|
||||
|
||||
if (valA === null && valB === null) {
|
||||
// neither has attribute at all
|
||||
continue;
|
||||
|
||||
@@ -361,7 +361,7 @@ function getExpression(tokens, searchContext, level = 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
exp.subExpression = getAggregateExpression();console.log(exp);
|
||||
exp.subExpression = getAggregateExpression();
|
||||
return exp;
|
||||
}
|
||||
else if (token === 'not') {
|
||||
|
||||
Reference in New Issue
Block a user