mirror of https://github.com/sveltejs/svelte
parent
da2feafe67
commit
4dfad73786
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: remount at any hydration error
|
@ -0,0 +1 @@
|
|||||||
|
<p>nested</p>
|
@ -0,0 +1,21 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
/** @type {string[]} */
|
||||||
|
let logs = [];
|
||||||
|
/** @type {typeof console['error']} */
|
||||||
|
let console_error;
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
before_test() {
|
||||||
|
console_error = console.error;
|
||||||
|
console.error = (...args) => logs.push(args.join(''));
|
||||||
|
},
|
||||||
|
after_test() {
|
||||||
|
console.error = console_error;
|
||||||
|
},
|
||||||
|
test({ deepEqual }) {
|
||||||
|
deepEqual(logs, [
|
||||||
|
"Failed to hydrate: HierarchyRequestError: Node can't be inserted in a #text parent."
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1 @@
|
|||||||
|
<main><p>nested</p><!----></main>
|
@ -0,0 +1,2 @@
|
|||||||
|
<!--[-->
|
||||||
|
<main><p>nested</p><!----></main><!--]-->
|
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
import Nested from './Nested.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<Nested />
|
||||||
|
</main>
|
Loading…
Reference in new issue