Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX release-1-13] Ensure concatenatedProperties are not stomped. #12104

Merged
merged 1 commit into from
Aug 15, 2015

Commits on Aug 14, 2015

  1. [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 emberjs#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.
    rwjblue committed Aug 14, 2015
    Configuration menu
    Copy the full SHA
    98d7cf3 View commit details
    Browse the repository at this point in the history