diff options
Diffstat (limited to 'client/src/app/shared/rest')
-rw-r--r-- | client/src/app/shared/rest/rest.service.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/shared/rest/rest.service.ts b/client/src/app/shared/rest/rest.service.ts index cd6db1f3c..78558851a 100644 --- a/client/src/app/shared/rest/rest.service.ts +++ b/client/src/app/shared/rest/rest.service.ts | |||
@@ -46,7 +46,7 @@ export class RestService { | |||
46 | addObjectParams (params: HttpParams, object: { [ name: string ]: any }) { | 46 | addObjectParams (params: HttpParams, object: { [ name: string ]: any }) { |
47 | for (const name of Object.keys(object)) { | 47 | for (const name of Object.keys(object)) { |
48 | const value = object[name] | 48 | const value = object[name] |
49 | if (!value) continue | 49 | if (value === undefined || value === null) continue |
50 | 50 | ||
51 | if (Array.isArray(value) && value.length !== 0) { | 51 | if (Array.isArray(value) && value.length !== 0) { |
52 | for (const v of value) params = params.append(name, v) | 52 | for (const v of value) params = params.append(name, v) |
@@ -93,7 +93,7 @@ export class RestService { | |||
93 | 93 | ||
94 | return t | 94 | return t |
95 | }) | 95 | }) |
96 | .filter(t => !!t) | 96 | .filter(t => !!t || t === 0) |
97 | 97 | ||
98 | if (matchedTokens.length === 0) continue | 98 | if (matchedTokens.length === 0) continue |
99 | 99 | ||
@@ -103,7 +103,7 @@ export class RestService { | |||
103 | } | 103 | } |
104 | 104 | ||
105 | return { | 105 | return { |
106 | search: searchTokens.join(' '), | 106 | search: searchTokens.join(' ') || undefined, |
107 | 107 | ||
108 | ...additionalFilters | 108 | ...additionalFilters |
109 | } | 109 | } |