PolymerElements / test-fixture

21 stars 14 forks source link

Some configurations break `dom-template` #31

Open cdata opened 8 years ago

cdata commented 8 years ago

It is possible for some configurations of elements to break when using dom-template to stamp some DOM. dom-template attempts to notify the "parent" context of property changes, and ends up effectively trying if(foo in undefined) { ... }, which throws.

parioux commented 8 years ago

Had the same problem while writing a test ... Got around it by setting the _parentProps property to an empty object (crashes in notifyPath function). Found the workaround by looking at the commits of app-route mentioned here.

var tmpl = document.querySelector('#my-test-fixture').fixtureTemplates[0]; tmpl._parentProps = {};