File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed
packages/svelte/src/internal/server Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,6 @@ import { current_component } from './context.js';
20
20
*/
21
21
let parent = null ;
22
22
23
- /**
24
- * @param {import('#server').Payload } payload
25
- * @param {string } message
26
- */
27
- function error_on_client ( payload , message ) {
28
- message =
29
- `${ message } \n\n` +
30
- 'This can cause content to shift around as the browser repairs the HTML, and will likely result in a `hydration_mismatch` warning.' ;
31
- // eslint-disable-next-line no-console
32
- console . error ( message ) ;
33
- payload . head . out += `<script>console.error(${ JSON . stringify ( message ) } )</script>` ;
34
- }
35
-
36
23
/**
37
24
* @param {Element } element
38
25
*/
@@ -47,7 +34,13 @@ function stringify(element) {
47
34
* @param {Element } child
48
35
*/
49
36
function print_error ( payload , parent , child ) {
50
- error_on_client ( payload , `${ stringify ( child ) } cannot contain ${ stringify ( parent ) } ` ) ;
37
+ var message =
38
+ `${ stringify ( child ) } cannot contain ${ stringify ( parent ) } \n\n` +
39
+ 'This can cause content to shift around as the browser repairs the HTML, and will likely result in a `hydration_mismatch` warning.' ;
40
+
41
+ // eslint-disable-next-line no-console
42
+ console . error ( message ) ;
43
+ payload . head . out += `<script>console.error(${ JSON . stringify ( message ) } )</script>` ;
51
44
}
52
45
53
46
/**
You can’t perform that action at this time.
0 commit comments