mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
Fixes setting custom element data to zero
This commit is contained in:
parent
28dd6a899a
commit
a4bc7c5a26
@ -101,7 +101,7 @@ export function setAttributes(node, attributes) {
|
||||
export function setCustomElementData(node, prop, value) {
|
||||
if (prop in node) {
|
||||
node[prop] = value;
|
||||
} else if (value) {
|
||||
} else if (value != null) {
|
||||
setAttribute(node, prop, value);
|
||||
} else {
|
||||
node.removeAttribute(prop);
|
||||
|
Loading…
Reference in New Issue
Block a user