We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 955c959 commit 0b7d37cCopy full SHA for 0b7d37c
packages/svelte/src/internal/client/render.js
@@ -49,14 +49,12 @@ export function set_should_intro(value) {
49
*/
50
export function set_text(text, value) {
51
// For objects, we apply string coercion before diffing
52
- if (typeof value === 'object' && value !== null) {
53
- value = value + '';
54
- }
+ var str = value == null ? '' : typeof value === 'object' ? value + '' : value;
55
// @ts-expect-error
56
- if (value !== (text.__t ??= text.nodeValue)) {
+ if (str !== (text.__t ??= text.nodeValue)) {
57
58
- text.__t = value;
59
- text.nodeValue = value == null ? '' : value + '';
+ text.__t = str;
+ text.nodeValue = str == null ? '' : str + '';
60
}
61
62
0 commit comments