diff --git a/CHANGELOG.md b/CHANGELOG.md index 606645a7b0..491da451c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased * Upgraded `css-tree` to `2.1.0` ([#7572](https://github.com/sveltejs/svelte/pull/7572)) +* Check if `parentNode` exists before removing child ([#6037](https://github.com/sveltejs/svelte/issues/6037)) ## 3.52.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 816faf31aa..6153ae25d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,7 @@ Working on your first Pull Request? You can learn how from this free video serie ### Proposing a change -If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can also file an issue with [feature template](https://github.com/sveltejs/svelte/issues/new?template=feature_request.md). +If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can also file an issue with [feature template](https://github.com/sveltejs/svelte/issues/new?template=feature_request.yml). If you're only fixing a bug, it's fine to submit a pull request right away, but we still recommend that you file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue. diff --git a/site/content/blog/2022-11-01-whats-new-in-svelte-november-2022.md b/site/content/blog/2022-11-01-whats-new-in-svelte-november-2022.md index 0c909548af..1bd83afb2e 100644 --- a/site/content/blog/2022-11-01-whats-new-in-svelte-november-2022.md +++ b/site/content/blog/2022-11-01-whats-new-in-svelte-november-2022.md @@ -12,7 +12,7 @@ There's also a _huge_ showcase to cover... so let's jump in! ## What's new in SvelteKit - The new `update` method for `use:enhance` lets you easily get back the default form behavior while augmenting it with your own logic ([docs](https://kit.svelte.dev/docs/form-actions#progressive-enhancement-use-enhance), [#7083](https://github.com/sveltejs/kit/pull/7083) and [#7326](https://github.com/sveltejs/kit/pull/7326)) - `[[optional]]` parameters are now available for routing ([docs](https://kit.svelte.dev/docs/advanced-routing#optional-parameters), [#7051](https://github.com/sveltejs/kit/pull/7051)) -- `goto` now has `invalidateAll` to (re-)run all `load` functions belonging to the new active page ([docs](https://kit.svelte.dev/docs/modules#app-navigation-goto), [#7407](https://github.com/sveltejs/kit/pull/7407)) +- `goto` now has `invalidateAll` to (re-)run all `load` functions belonging to the new active page ([docs](https://kit.svelte.dev/docs/modules#$app-navigation-goto), [#7407](https://github.com/sveltejs/kit/pull/7407)) - `config.kit.paths.base` is now used in adapters looking for static assets - fixing 404 issues across `adapter-netlify`, `adapter-vercel`, `adapter-cloudflare`, and `adapter-cloudflare-workers` ([#4448](https://github.com/sveltejs/kit/pull/4448)) **Breaking changes:** diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index e6b2c270df..ca76b11ab3 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -204,7 +204,9 @@ export function insert_hydration(target: NodeEx, node: NodeEx, anchor?: NodeEx) } export function detach(node: Node) { - node.parentNode.removeChild(node); + if (node.parentNode) { + node.parentNode.removeChild(node); + } } export function destroy_each(iterations, detaching) {