Skip to content

Commit

Permalink
fix: remove value in changeset when value is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
remadex committed Dec 6, 2024
1 parent 909c051 commit 18bff1c
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ export default class TpkValidationMobilePrefabComponent extends BaseValidationCo

@action
onChangeValueMobile(value: unknown) {
if (!value) return;
this.args.changeset.set(
this.args.validationField,
`${this.selectedPrefix.code}${value}`,
);
if (!value) {
this.args.changeset.set(this.args.validationField, value);
} else {
this.args.changeset.set(
this.args.validationField,
`${this.selectedPrefix.code}${value}`,
);
}
}

@action
Expand Down

0 comments on commit 18bff1c

Please sign in to comment.