Skip to content

Commit

Permalink
more tries
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Nov 11, 2023
1 parent 87c7bb5 commit 6eea998
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ function replaceComponent(OldType, NewType, resetHookState) {
vnode[VNODE_COMPONENT].constructor = NewType;
}

vnode[VNODE_COMPONENT].__v = vnode;

if (resetHookState) {
if (
vnode[VNODE_COMPONENT][COMPONENT_HOOKS] &&
Expand Down
14 changes: 6 additions & 8 deletions packages/core/src/runtime/vnode.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ options.vnode = vnode => {
}

vnode.type = foundType;
if (vnode[VNODE_COMPONENT]) {
vnode[VNODE_COMPONENT].__v = vnode;
if (
'prototype' in vnode.type &&
vnode.type.prototype.render
) {
vnode[VNODE_COMPONENT].constructor = vnode.type;
}
if (
vnode[VNODE_COMPONENT] &&
'prototype' in vnode.type &&
vnode.type.prototype.render
) {
vnode[VNODE_COMPONENT].constructor = vnode.type;
}
}

Expand Down

0 comments on commit 6eea998

Please sign in to comment.