Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Hydration failed because the initial UI does not match what was rendered on the

This warning is thrown when Svelte encounters an error while hydrating the HTML from the server. During hydration, Svelte walks the DOM, expecting a certain structure. If that structure is different (for example because the HTML was repaired by the DOM because of invalid HTML), then Svelte will run into issues, resulting in this warning.

During development, this error is often preceeded by a `console.error` detailing the offending HTML, which needs fixing.
During development, this error is often preceded by a `console.error` detailing the offending HTML, which needs fixing.

### invalid_raw_snippet_render

Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/messages/client-warnings/warnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ To fix this, either silence the warning with a [`svelte-ignore`](basic-markup#Co

This warning is thrown when Svelte encounters an error while hydrating the HTML from the server. During hydration, Svelte walks the DOM, expecting a certain structure. If that structure is different (for example because the HTML was repaired by the DOM because of invalid HTML), then Svelte will run into issues, resulting in this warning.

During development, this error is often preceeded by a `console.error` detailing the offending HTML, which needs fixing.
During development, this error is often preceded by a `console.error` detailing the offending HTML, which needs fixing.

## invalid_raw_snippet_render

Expand Down
4 changes: 2 additions & 2 deletions packages/svelte/src/compiler/migrate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ const instance_script = {
'Encountered an export declaration pattern that is not supported for automigration.'
);
// Turn export let into props. It's really really weird because export let { x: foo, z: [bar]} = ..
// means that foo and bar are the props (i.e. the leafs are the prop names), not x and z.
// means that foo and bar are the props (i.e. the leaves are the prop names), not x and z.
// const tmp = b.id(state.scope.generate('tmp'));
// const paths = extract_paths(declarator.id, tmp);
// state.props_pre.push(
Expand Down Expand Up @@ -1810,7 +1810,7 @@ function handle_events(element, state) {
}

/**
* Returns start and end of the node. If the start is preceeded with white-space-only before a line break,
* Returns start and end of the node. If the start is preceded with white-space-only before a line break,
* the start will be the start of the line.
* @param {string} source
* @param {LabeledStatement} node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export function VariableDeclaration(node, context) {
if (has_props) {
if (declarator.id.type !== 'Identifier') {
// Turn export let into props. It's really really weird because export let { x: foo, z: [bar]} = ..
// means that foo and bar are the props (i.e. the leafs are the prop names), not x and z.
// means that foo and bar are the props (i.e. the leaves are the prop names), not x and z.
const tmp = b.id(context.state.scope.generate('tmp'));
const { inserts, paths } = extract_paths(declarator.id, tmp);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function VariableDeclaration(node, context) {
if (has_props) {
if (declarator.id.type !== 'Identifier') {
// Turn export let into props. It's really really weird because export let { x: foo, z: [bar]} = ..
// means that foo and bar are the props (i.e. the leafs are the prop names), not x and z.
// means that foo and bar are the props (i.e. the leaves are the prop names), not x and z.
const tmp = b.id(context.state.scope.generate('tmp'));
const { inserts, paths } = extract_paths(declarator.id, tmp);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function transform_body(instance_body, runner, transform) {
(node) => /** @type {ESTree.Statement | ESTree.VariableDeclaration} */ (transform(node))
);

// Declarations for the await expressions (they will asign to them; need to be hoisted to be available in whole instance scope)
// Declarations for the await expressions (they will assign to them; need to be hoisted to be available in whole instance scope)
if (instance_body.declarations.length > 0) {
statements.push(
b.declaration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function bind_this(element_or_component = {}, update, get_value, get_part
untrack(() => {
if (element_or_component !== get_value(...parts)) {
update(element_or_component, ...parts);
// If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
// If this is an effect rerun (cause: each block context changes), then nullify the binding at
// the previous position if it isn't already taken over by a different effect.
if (old_parts && is_bound_this(get_value(...old_parts), element_or_component)) {
update(null, ...old_parts);
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/src/internal/client/dom/elements/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function add_form_reset_listener() {
}
});
},
// In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
// In the capture phase to guarantee we get noticed of it (no possibility of stopPropagation)
{ capture: true }
);
}
Expand Down
Loading