pull/12535/head
Dominic Gannaway 2 years ago
parent bf2847dbc3
commit 6143b3228d

@ -1,7 +1,3 @@
## bad_raw_snippet_render
> The `render` function passed to `createRawSnippet` should return HTML for a single element
## binding_property_non_reactive ## binding_property_non_reactive
> `%binding%` is binding to a non-reactive property > `%binding%` is binding to a non-reactive property
@ -24,6 +20,10 @@
> Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location% > Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%
## invalid_raw_snippet_render
> The `render` function passed to `createRawSnippet` should return HTML for a single element
## lifecycle_double_unmount ## lifecycle_double_unmount
> Tried to unmount a component that was not mounted > Tried to unmount a component that was not mounted

@ -92,7 +92,7 @@ export function createRawSnippet(fn) {
var fragment = create_fragment_from_html(html); var fragment = create_fragment_from_html(html);
element = /** @type {Element} */ (fragment.firstChild); element = /** @type {Element} */ (fragment.firstChild);
if (DEV && (element.nextSibling !== null || element.nodeType !== 3)) { if (DEV && (element.nextSibling !== null || element.nodeType !== 3)) {
w.bad_raw_snippet_render(); w.invalid_raw_snippet_render();
} }
anchor.before(element); anchor.before(element);
} }

@ -8,12 +8,12 @@ var normal = 'font-weight: normal';
/** /**
* The `render` function passed to `createRawSnippet` should return HTML for a single element * The `render` function passed to `createRawSnippet` should return HTML for a single element
*/ */
export function bad_raw_snippet_render() { export function invalid_raw_snippet_render() {
if (DEV) { if (DEV) {
console.warn(`%c[svelte] bad_raw_snippet_render\n%cThe \`render\` function passed to \`createRawSnippet\` should return HTML for a single element`, bold, normal); console.warn(`%c[svelte] invalid_raw_snippet_render\n%cThe \`render\` function passed to \`createRawSnippet\` should return HTML for a single element`, bold, normal);
} else { } else {
// TODO print a link to the documentation // TODO print a link to the documentation
console.warn("bad_raw_snippet_render"); console.warn("invalid_raw_snippet_render");
} }
} }

@ -4,10 +4,7 @@
const snippet = createRawSnippet(() => ({ const snippet = createRawSnippet(() => ({
render: () => ` render: () => `
<!-- --><div>123</div> <!-- --><div>123</div>
`, `
setup(target) {
}
})); }));
</script> </script>

Loading…
Cancel
Save