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

trailing space in polymer attributes causes exception in IE10 #313

Closed
frankiefu opened this issue Oct 9, 2013 · 0 comments
Closed

trailing space in polymer attributes causes exception in IE10 #313

frankiefu opened this issue Oct 9, 2013 · 0 comments

Comments

@frankiefu
Copy link
Member

<polymer-element name="x-foo" noscript attributes="bar ">
  <template>
    {{bar}}
  </template>
</polymer-element>

<x-foo bar="hello"></x-foo>

output:

TypeError: Unable to get property 'hasAttribute' of undefined or null referenceTypeError: Unable to get property 'hasAttribute' of undefined or null reference
at parseDeclaration (http://172.31.55.70/polymer/polymer/src/instance/base.js:95:9)
at parseDeclarations (http://172.31.55.70/polymer/polymer/src/instance/base.js:88:9)
at prepareElement (http://172.31.55.70/polymer/polymer/src/instance/base.js:43:7)
at createdCallback (http://172.31.55.70/polymer/polymer/src/instance/base.js:25:9)
at created (http://172.31.55.70/polymer/CustomElements/src/CustomElements.js:264:7)
at upgrade (http://172.31.55.70/polymer/CustomElements/src/CustomElements.js:219:5)
at upgradeElement (http://172.31.55.70/polymer/CustomElements/src/CustomElements.js:321:7)
at upgrade (http://172.31.55.70/polymer/CustomElements/src/Observer.js:84:7)
at added (http://172.31.55.70/polymer/CustomElements/src/Observer.js:56:3)
at Anonymous function (http://172.31.55.70/polymer/CustomElements/src/Observer.js:66:5)

Debugging shows that in declaration/attributes.js::publishAttributes(), an empty string is added to the publish object, e.g. {bar: null, "": null}. Somehow this seems to be fatal in IE10.

In publishAttributes(), it should add to publish only if the name is not emtpy.

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