do not switch expression when there are no conditions

This commit is contained in:
MaysWind
2025-12-20 00:40:58 +08:00
parent e9b4392163
commit fb55cd1b33
2 changed files with 8 additions and 3 deletions
+4
View File
@@ -105,6 +105,10 @@ export class TransactionExploreQuery {
}
public toExpression(allCategoriesMap: Record<string, TransactionCategory>, allAccountsMap: Record<string, Account>, allTagsMap: Record<string, TransactionTag>): string {
if (!this.conditions || this.conditions.length < 1) {
return '';
}
const postfixExprTokens = this.getPostfixExprTokens();
const stack: ExpressionNode[] = [];