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:
Joffrey JAFFEUX 2023-08-17 18:07:06 +02:00 committed by GitHub
parent 712bbf9b88
commit 95c4d97db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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(