Skip to content

md-button attaches class "md-undefined" to host element when on color provided #75

Closed
@traviskaufman

Description

@traviskaufman

Given an html snippet with an md-button directive like so:

<button md-button>flat</button>

This produces the following ouput:

<button md-button ... class="md-undefined">...</button>

What it should produce is:

<button md-button ...>...</button>

The md-undefined class is getting attached due to this code since setClassList() returns "md-undefined" when the color attribute is unset.

I tried working around the by returning an empty string when color is undefined, but that resulted in this html:

<button md-button ... class>...</button>

Which is also invalid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions