We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2782a3 commit 18302d3Copy full SHA for 18302d3
projects/ngneat/bind-query-params/src/lib/utils.ts
@@ -5,9 +5,9 @@ import { QueryParamDef } from './QueryParamDef';
5
function isEmptyValue(def: QueryParamDef, value: any) {
6
switch (def.type) {
7
case 'array':
8
- return !!value.length;
+ return !value.length;
9
case 'object':
10
- return !!Object.keys(value).length;
+ return !value || !Object.keys(value).length;
11
case 'string':
12
return !value || value === '';
13
default:
0 commit comments