Closed
Description
<a href={null} something-else={null}>Alas!</a>
In the compiled JavaScript:
a.href = null;
setAttribute(a, "something-else", null);
Although a.href = null;
is shorter than setAttribute(a, "href", null)
, it’s incorrect, because setting HTMLAnchorElement.prototype.href
stringifies its argument, including null
, and so you end up with <a href="null>
.
It’s not the most common situation to craft an <a>
which may or may not have an href
, but I just hit this now.
Metadata
Metadata
Assignees
Labels
No labels