Skip to content

Commit

Permalink
FIX: do not mutate this.attrs and this.actions (#23125)
Browse files Browse the repository at this point in the history
Prior to this fix we would always re-set `this.attrs` with `this.attrs` when defined, which is both wasteful but also dangerous as `this.attrs` can possibly error when mutated.
  • Loading branch information
jjaffeux committed Aug 17, 2023
1 parent 712bbf9 commit 95c4d97
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1127,8 +1127,8 @@ export default Component.extend(
},

_deprecateMutations() {
this.actions = this.actions || {};
this.attrs = this.attrs || {};
this.actions ??= {};
this.attrs ??= {};

if (!this.attrs.onChange && !this.actions.onChange) {
this._deprecated(
Expand Down

0 comments on commit 95c4d97

Please sign in to comment.