Skip to content

Commit 18302d3

Browse files
committed
fix: change 'twoWay' to sync url-> model not only once
Fix falling unit-test for new isEmptyValue implementation
1 parent a2782a3 commit 18302d3

File tree

1 file changed

+2
-2
lines changed
  • projects/ngneat/bind-query-params/src/lib

1 file changed

+2
-2
lines changed

projects/ngneat/bind-query-params/src/lib/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { QueryParamDef } from './QueryParamDef';
55
function isEmptyValue(def: QueryParamDef, value: any) {
66
switch (def.type) {
77
case 'array':
8-
return !!value.length;
8+
return !value.length;
99
case 'object':
10-
return !!Object.keys(value).length;
10+
return !value || !Object.keys(value).length;
1111
case 'string':
1212
return !value || value === '';
1313
default:

0 commit comments

Comments
 (0)