From f7ca0a44a5d198d600521afa44341736c9bee0c8 Mon Sep 17 00:00:00 2001 From: Dex Date: Fri, 25 Sep 2026 00:04:17 +0200 Subject: [PATCH] chore: fix typos in code comments (#18860) Fixes four typos in code comments (no behavioral change): - `packages/svelte/src/index-client.js`: `noone` -> `no one` - `packages/svelte/src/internal/client/dom/css.js`: `Therfore` -> `Therefore` - `packages/svelte/src/internal/client/runtime.js`: `loosing` -> `losing` - `packages/svelte/src/internal/server/index.js`: `aswell` -> `as well` Checklist: title prefixed with `chore:`; comment-only change so no changeset and no behavior affected. Co-authored-by: Dextheking1 --- packages/svelte/src/index-client.js | 2 +- packages/svelte/src/internal/client/dom/css.js | 2 +- packages/svelte/src/internal/client/runtime.js | 2 +- packages/svelte/src/internal/server/index.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/svelte/src/index-client.js b/packages/svelte/src/index-client.js index 0eb1b80315..3da59eb7f7 100644 --- a/packages/svelte/src/index-client.js +++ b/packages/svelte/src/index-client.js @@ -17,7 +17,7 @@ if (DEV) { if (!(rune in globalThis)) { // TODO if people start adjusting the "this can contain runes" config through v-p-s more, adjust this message /** @type {any} */ - let value; // let's hope noone modifies this global, but belts and braces + let value; // let's hope no one modifies this global, but belts and braces Object.defineProperty(globalThis, rune, { configurable: true, // eslint-disable-next-line getter-return diff --git a/packages/svelte/src/internal/client/dom/css.js b/packages/svelte/src/internal/client/dom/css.js index 23f4eff4f7..78a32901fe 100644 --- a/packages/svelte/src/internal/client/dom/css.js +++ b/packages/svelte/src/internal/client/dom/css.js @@ -12,7 +12,7 @@ export function append_styles(anchor, css) { // Use an effect to ensure `anchor` is in the DOM, otherwise getRootNode() will yield wrong results effect(() => { // Bit of a hack: branches.js/each.js use offscreen fragments with temporary text nodes that will - // never be connected to the real dom. Therfore walk up to the branch that has created the component + // never be connected to the real dom. Therefore walk up to the branch that has created the component // whose styles we want to append, and check its node instead. It will be connected by the time we get here. anchor = active_effect?.parent?.nodes?.start ?? anchor; var root = anchor.getRootNode(); diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index 6212605008..76802974b7 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -410,7 +410,7 @@ function remove_reaction(signal, dependency) { // In a fork it's possible that a derived is executed and gets reactions, then commits, but is // never re-executed. This is possible when the derived is only executed once in the context // of a new branch which happens before fork.commit() runs. In this case, the derived still has - // UNINITIALIZED as its value, and then when it's loosing its reactions we need to ensure it stays + // UNINITIALIZED as its value, and then when it's losing its reactions we need to ensure it stays // DIRTY so it is reexecuted once someone wants its value again. if (derived.v !== UNINITIALIZED) { update_derived_status(derived); diff --git a/packages/svelte/src/internal/server/index.js b/packages/svelte/src/internal/server/index.js index 20bef78306..6a63bd9fd6 100644 --- a/packages/svelte/src/internal/server/index.js +++ b/packages/svelte/src/internal/server/index.js @@ -168,7 +168,7 @@ export function attributes(attrs, css_hash, classes, styles, flags = 0) { // value/checked takes precedence over defaultValue/defaultChecked name = name === 'defaultvalue' ? 'value' : 'checked'; if (name in attrs) continue; - // We're checking prior entries aswell because "name in attrs" is not enough as the attributes may have different casing + // We're checking prior entries as well because "name in attrs" is not enough as the attributes may have different casing for (let j = 0; j < names.length; j++) { if (names[j].toLowerCase() === name) continue outer; }