From e1479a54e8e9a7f2fd9e51798f4f3ce66413342e Mon Sep 17 00:00:00 2001 From: Lucas Barrena Date: Wed, 12 Jul 2023 17:48:35 -0300 Subject: [PATCH 1/2] Fix vnode DOM not existing --- packages/core/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/index.js b/packages/core/src/index.js index ca481c85..6c80ef4e 100644 --- a/packages/core/src/index.js +++ b/packages/core/src/index.js @@ -54,7 +54,7 @@ function replaceComponent(OldType, NewType, resetHookState) { pendingUpdates = pendingUpdates.filter(p => p[0] !== OldType); vnodes.forEach(vnode => { - if (!vnode.__c.__P) return; + if (!vnode.__c || !vnode.__c.__P) return; // update the type in-place to reference the new component vnode.type = NewType; From b621c1bce6e6c432f0624d826ae2785066d72163 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Sun, 20 Aug 2023 09:49:08 +0200 Subject: [PATCH 2/2] Create gentle-pillows-beam.md --- .changeset/gentle-pillows-beam.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/gentle-pillows-beam.md diff --git a/.changeset/gentle-pillows-beam.md b/.changeset/gentle-pillows-beam.md new file mode 100644 index 00000000..650e987d --- /dev/null +++ b/.changeset/gentle-pillows-beam.md @@ -0,0 +1,5 @@ +--- +"@prefresh/core": patch +--- + +Add guard for undefined parentDom