Skip to content

Commit

Permalink
fix: event attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
AkaraChen committed Jan 30, 2023
1 parent 1b64a40 commit 6e0f13e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/runtime/dom/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export function createElement(node: VNode | VNode[]): Node {
if (key.startsWith("on")) {
const eventName = key.slice(2).toLowerCase();
el.addEventListener(eventName, value);
}
if (key === "style") {
} else if (key === "style") {
for (const styleKey of value) {
const styleValue = value[styleKey];
(el as HTMLElement).style[styleKey] = styleValue;
Expand Down

0 comments on commit 6e0f13e

Please sign in to comment.