mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 07:20:12 +01:00
Merge pull request #3708 from jrsupplee/issue-3698
Bug fix for issue #3698
This commit is contained in:
commit
e709094533
5 changed files with 104 additions and 176 deletions
|
|
@ -53,7 +53,9 @@ export class QueryParams {
|
|||
|
||||
hasOperator(operator) {
|
||||
return (
|
||||
this.params[operator] !== undefined && this.params[operator].length > 0
|
||||
this.params[operator] !== undefined &&
|
||||
(this.params[operator].length === undefined ||
|
||||
this.params[operator].length > 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +71,11 @@ export class QueryParams {
|
|||
}
|
||||
|
||||
getPredicate(operator) {
|
||||
return this.params[operator][0];
|
||||
if (typeof this.params[operator] === 'object') {
|
||||
return this.params[operator][0];
|
||||
} else {
|
||||
return this.params[operator];
|
||||
}
|
||||
}
|
||||
|
||||
getPredicates(operator) {
|
||||
|
|
@ -198,6 +204,10 @@ export class Query {
|
|||
return this.queryParams;
|
||||
}
|
||||
|
||||
setQueryParams(queryParams) {
|
||||
this.queryParams = queryParams;
|
||||
}
|
||||
|
||||
addPredicate(operator, predicate) {
|
||||
this.queryParams.addPredicate(operator, predicate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue