Skip to content

Commit 699caa6

Browse files
committed
this seems to work
1 parent a11e2cd commit 699caa6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/svelte/src/internal/client/dom/operations.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export function init_operations() {
3434
// @ts-expect-error
3535
element_prototype.__e = undefined;
3636

37+
// @ts-expect-error
38+
Text.prototype.__t = undefined;
39+
3740
if (DEV) {
3841
// @ts-expect-error
3942
element_prototype.__svelte_meta = null;

packages/svelte/src/internal/client/render.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ export function set_should_intro(value) {
4141
* @returns {void}
4242
*/
4343
export function set_text(text, value) {
44-
if (text.nodeValue != value) {
45-
text.nodeValue = value;
44+
// @ts-expect-error
45+
const prev = (text.__t ??= text.nodeValue);
46+
47+
if (prev !== value) {
48+
// @ts-expect-error
49+
text.nodeValue = text.__t = value;
4650
}
4751
}
4852

0 commit comments

Comments
 (0)