Skip to content

Commit

Permalink
fix(validated-input): use changeset.set if available to preserve stat…
Browse files Browse the repository at this point in the history
…e tracking on nested objects
  • Loading branch information
velrest committed May 21, 2021
1 parent 85a6780 commit 1e6267a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/components/validated-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export class ValidatedInput extends Component {
if (this["on-update"]) {
this["on-update"](value, this.args.model);
} else {
set(this.args.model, this.args.name, value);
this.args.model.set?.(this.args.name, value) ||
set(this.args.model, this.args.name, value);
}
}
}
Expand Down

0 comments on commit 1e6267a

Please sign in to comment.