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

serializeValueToAttribute returns undefined #1559

Closed
torsoe opened this issue May 18, 2015 · 1 comment
Closed

serializeValueToAttribute returns undefined #1559

torsoe opened this issue May 18, 2015 · 1 comment
Assignees
Labels

Comments

@torsoe
Copy link

torsoe commented May 18, 2015

serializeValueToAttribute: function (value, attribute, node) {
  if (attribute === 'class') {
    var host = node === this ? Polymer.dom(this).getOwnerRoot() || this.dataHost : this;
    if (host) {
      value = host._scopeElementClass(node, value);
    }

throws an error "TypeError: element is undefined"

serializeValueToAttribute: function (value, attribute, node) {
  if (attribute === 'class') {
    var host = node === this ? Polymer.dom(this).getOwnerRoot() || this.dataHost : this;
    if (host) {
      value = host._scopeElementClass(host, value);
    }

returns the right result

@sorvell sorvell added the p2 label May 21, 2015
@sorvell sorvell self-assigned this May 21, 2015
@kevinpschaaf
Copy link
Member

Probably should be

    if (host && node) {
      value = host._scopeElementClass(node, value);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants