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 15e06b2 commit 87c7bb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function replaceComponent(OldType, NewType, resetHookState) {
vnode.type = NewType;

if (vnode[VNODE_COMPONENT]) {
let oldHooks = vnode[VNODE_COMPONENT][COMPONENT_HOOKS];
vnode[VNODE_COMPONENT].constructor = vnode.type;

try {
Expand Down Expand Up @@ -99,9 +98,6 @@ function replaceComponent(OldType, NewType, resetHookState) {
vnode[VNODE_COMPONENT].constructor = NewType;
}

vnode[VNODE_COMPONENT].__v = vnode;
vnode[VNODE_COMPONENT][COMPONENT_HOOKS] = oldHooks;

if (resetHookState) {
if (
vnode[VNODE_COMPONENT][COMPONENT_HOOKS] &&
Expand Down
2 changes: 2 additions & 0 deletions packages/vite/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ module.exports = function prefreshPlugin(options = {}) {
try {
flushUpdates();
} catch (e) {
// TODO: remove debugging code
console.log(e);
self.location.reload();
}
});
Expand Down

0 comments on commit 87c7bb5

Please sign in to comment.