captured the correct value for next instead of using key

pull/11783/head
godzylinux 2 years ago
parent d1f5d5d33d
commit 929d6344d5

@ -192,7 +192,9 @@ export function set_attributes(element, prev, next, lowercase_attributes, css_ha
events.push([
key,
value,
() => (next[key] = create_event(event_name, element, value, opts))
// since key is a var, when calling this in a later point, it will point the last value it had
// hence we can't do that and we have to do this instead
() => (next[`on${event_name}`] = create_event(event_name, element, value, opts))
]);
} else {
next[key] = create_event(event_name, element, value, opts);

Loading…
Cancel
Save