Skip to content

mustache in class compiles to undefined #2085

@xuanyan0x7c7

Description

@xuanyan0x7c7
var child = {
  template: '<div class="one"></div>'
}
var parent = {
  template: '<child class="pre-{{name}}"></child>',
  data() {
    return {name: "two"}
  },
  components: {child}
}

It compiles to <div class="one pre-undefined"></div>.
The bug won't appear if there is no class attribute on the root of child component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions