dataset
optimization does not respect null indicating to remove the attribute
#3337
Labels
dataset
optimization does not respect null indicating to remove the attribute
#3337
Describe the bug
data-foo={bar}
should, like other attribute settings, remove the attribute when setting it to a value ofnull
orundefined
. The optimization (used unlesslegacy
is enabled) of instead assigning to thedataset
object prevents this.To Reproduce
Expected behavior
The
data-foo
attribute should be not present when the checkbox is unchecked, not the string'null'
.Severity
Not personally affecting me.
Additional context
Came up in regard to this question. I believe this should be the way to handle that, but it doesn't work.
The text was updated successfully, but these errors were encountered: