Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/util/conditionalExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,8 @@ class RegExpEvaluator implements FilterComparator {
}

evaluate(lVal: unknown): boolean {
const type = typeof lVal;
return isString(type) ? this._condVal.test(lVal as string)
: isNumber(type) ? this._condVal.test(lVal + '')
return isString(lVal) ? this._condVal.test(lVal)
: isNumber(lVal) ? this._condVal.test(lVal + '')
: false;
}
}
Expand Down
106 changes: 106 additions & 0 deletions test/ut/spec/data/filterTransform.test.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.