Merge pull request #3687 from jrsupplee/issue-1667

Fix bug in My Cards and Global Search
This commit is contained in:
Lauri Ojansivu 2021-03-31 14:21:48 +03:00 committed by GitHub
commit 04a8d85836
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 20 deletions

View file

@ -45,12 +45,15 @@ import moment from 'moment';
export class QueryParams {
text = '';
constructor(params = {}) {
constructor(params = {}, text = '') {
this.params = params;
this.text = text;
}
hasOperator(operator) {
return this.params[operator];
return (
this.params[operator] !== undefined && this.params[operator].length > 0
);
}
addPredicate(operator, predicate) {
@ -189,8 +192,8 @@ export class Query {
return this._errors.errorMessages();
}
getParams() {
return this.queryParams.getParams();
getQueryParams() {
return this.queryParams;
}
addPredicate(operator, predicate) {