Skip to content

Build your personal knowledge base with Trilium Notes

Merge branch 'feature/typescript_backend_2' into feature/typescript_backend_3

Elian Doran0903cf2646e5
diff --cc src/services/search/expressions/order_by_and_limit.ts
index 8f1f0826a1,9a68f9eb25..5159920a5a
--- a/src/services/search/expressions/order_by_and_limit.ts
+++ b/src/services/search/expressions/order_by_and_limit.ts
@@@ -37,12 -19,8 +37,11 @@@ class OrderByAndLimitExp extends Expres
this.subExpression = null; // it's expected to be set after construction
}
- execute(inputNoteSet, executionContext, searchContext) {
+ execute(inputNoteSet: NoteSet, executionContext: {}, searchContext: SearchContext) {
+ if (!this.subExpression) {
- // FIXME: who is setting the subexpression?
+ throw new Error("Missing subexpression");
+ }
+
let {notes} = this.subExpression.execute(inputNoteSet, executionContext, searchContext);
notes.sort((a, b) => {