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

disable-upgrade on an element with data-binding results in Cannot read property error if there are multiple custom elements in the template #4302

Closed
1 task done
JohnRiv opened this issue Feb 9, 2017 · 0 comments

Comments

@JohnRiv
Copy link

JohnRiv commented Feb 9, 2017

Description

The following error is thrown when there are 2 custom elements in a template and one has data-binding & the disable-update attribute applied to it:

polymer.html:2033 Uncaught TypeError: Cannot read property 'foo' of undefined
    at HTMLElement._configValue (polymer.html:2033)
    at HTMLElement._distributeConfig (polymer.html:2094)
    at HTMLElement._configure (polymer.html:2053)
    at HTMLElement._beforeClientsReady (polymer.html:2039)
    at HTMLElement._ready (polymer-mini.html:63)
    at HTMLElement._tryReady (polymer-mini.html:56)
    at HTMLElement._initFeatures (polymer.html:4133)
    at HTMLElement.__initialize (polymer-micro.html:233)
    at HTMLElement.createdCallback (polymer-micro.html:216)
    at window.Polymer (polymer-micro.html:62)

Live Demo

http://codepen.io/JohnRiv/pen/RKeJNx?editors=1010

See Live Demo for full code, but here's the markup that causes the error:

  <dom-module id="x-bar">
    <template>
      <x-baz></x-baz> <!-- Remove <x-baz></x-baz> and there are no errors -->
      <x-foo disable-upgrade foo="[[foo]]"></x-foo>
    </template>
  </dom-module>

Steps to Reproduce

  1. Define 2 basic custom elements, one of which should define a property
  2. Create a custom element with a defined property and place the 2 custom elements in the element's template
  3. Data-bind the property of the parent custom element to the child custom element in the template
  4. Add the disable-upgrade attribute to the custom element

Expected Results

No error is thrown

Actual Results

Error is thrown.
If you either remove the other custom element from the template, or remove the data-binding, there is no error thrown.

Browsers Affected

  • Chrome
    (I haven't tested other browsers yet)

Versions

  • Polymer: v1.8.0
  • webcomponents: not applied, using Chrome Version 57.0.2987.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant