Skip to content

Commit b3edf30

Browse files
authored
fix(ngx-utils): Fix incorrect handling of form value in QueryParamSync
1 parent ba4b48d commit b3edf30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libs/angular/utils/src/lib/abstracts/query-param-form-sync/query-param-form-sync.component.abstract.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ export abstract class NgxQueryParamFormSyncComponent<
8686
value = this.unscrambleParams(value);
8787
}
8888

89+
//Iben: If the entire object is empty, we early exit and do not set the form
90+
if (Object.keys(value).length === 0) {
91+
return;
92+
}
93+
8994
// Iben: Set the current form value
9095
this.form.setValue(value);
9196
}),

0 commit comments

Comments
 (0)