-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX release-1-13] Ensure concatenatedProperties are not stomped.
When `_propagateAttrsToThis` is invoked it iterates all properties that are present in `this.attrs` and calls `this.set(attrName, attrValue)`. This is normally exactly what you expect. However, in the case of `concatenatedProperties` and `mergedProperties` this `set`ing causes the concatenated / merged property to be completely clobbered. The fix introduced in #12073 adds a very simple work around for the internally known items (just hard coding things like `classNames`, `classNameBindings`, `attributeBindings`, and `actions`). This was obviously a very naive check, and leaves any external usages of `concatenatedProperties` in components/views completely hosed. --- The changes here introduces a __avoidPropagating property that we can use to prevent `concatenatedProperties` and `mergedProperties` from being set inside `_propagateAttrsToThis`. To avoid introducing this cost for every component created (when only classes can define new concatenated / merged properties) we are storing the `__avoidPropagating` on the constructor itself. (cherry picked from commit 98d7cf3)
- Loading branch information
Showing
2 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters