FIX: do not mutate `this.attrs` and `this.actions` (#23125)
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.
This commit is contained in:
parent
712bbf9b88
commit
95c4d97db3
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue