marko-js / marko

A declarative, HTML-based language that makes building web apps fun

Home Page:https://markojs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removing a class attribute results in a "null" class

AngusMorton opened this issue · comments

Using the Tags API Preview, dynamically removing a class attribute results in a class of "null" instead of the class attribute being removed.

Given:

<const/hidden = true />
<div class=hidden ? "hidden" : "" />

When hidden is toggled, the class attribute will become "null" instead of being removed.

See: Playground Link

would work on this

can i please get more explanation

would work on this

can i please get more explanation

I checked it out, if you inspect the HTML of the button, you'll see that it becomes <button class="null"> instead of <button>. My guess would be that there's a JSON.stringify at play here hehehe

would work on this
can i please get more explanation

I checked it out, if you inspect the HTML of the button, you'll see that it becomes <button class="null"> instead of <button>. My guess would be that there's a JSON.stringify at play here hehehe

can you please specify the button having issue

would work on this
can i please get more explanation

I checked it out, if you inspect the HTML of the button, you'll see that it becomes <button class="null"> instead of <button>. My guess would be that there's a JSON.stringify at play here hehehe

can you please specify the button having issue

Check the playground link in the issue, there's only one button there ;)

@Harmedino apologies I missed your comment, this is resolved after #2178. (Release incoming).