Skip to content

Commit

Permalink
fix(jwc-runtime): diff function return a vnode
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Dec 15, 2022
1 parent f4f83af commit bb18358
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/jwc-runtime/v-dom/diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export class VNode {
constructor(
tagName: string,
attributes: { [key: string]: any },
children: VNode[]) {
children: VNode[]
) {
this.tagName = tagName;
this.attributes = attributes;
this.children = children;
Expand All @@ -42,11 +43,10 @@ export class VNode {
* @param oldVNode
* @param newVNode
*/
export function diff(oldVNode: VNode, newVNode: VNode): VNode {
export function diff(oldVNode: VNode, newVNode: VNode) {
markNewVNode(newVNode);
diffRecursive(oldVNode, newVNode);
update(newVNode);
return newVNode;
}

/**
Expand Down

0 comments on commit bb18358

Please sign in to comment.