Skip to content

Commit 7b832c6

Browse files
committed
fix style, & add note comment
1 parent 3637382 commit 7b832c6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

runtime/proxy-adapter-dom.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
/* global window, document */
22
import * as svelteInternal from 'svelte/internal'
3+
// NOTE from 3.38.3 (or so), insert was carrying the hydration logic, that must
4+
// be used because DOM elements are reused more (and so insertion points are not
5+
// necessarily added in order); then in 3.40 the logic was moved to
6+
// insert_hydration, which is the one we must use for HMR
37
const svelteInsert = svelteInternal.insert_hydration || svelteInternal.insert
4-
if(!svelteInsert) {
5-
throw new Error('failed to find insert_hydration and insert in svelte/internal')
8+
if (!svelteInsert) {
9+
throw new Error(
10+
'failed to find insert_hydration and insert in svelte/internal'
11+
)
612
}
713

814
import ErrorOverlay from './overlay.js'

0 commit comments

Comments
 (0)