Skip to content

Commit 2a0097e

Browse files
committed
docs: note null/undefined breaking change
closes #10043
1 parent 2133d7d commit 2a0097e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,7 @@ In Svelte 4, it was possible to specify event attributes on HTML elements as a s
107107
```
108108

109109
This is not recommended, and is no longer possible in Svelte 5, where properties like `onclick` replace `on:click` as the mechanism for adding [event handlers](/docs/event-handlers).
110+
111+
### `null` and `undefined` become the empty string
112+
113+
In Svelte 4, `null` and `undefined` were printed as the corresponding string. In 99 out of 100 cases you want this to become the empty string instead, which is also what most other frameworks out there do. Therefore, in Svelte 5, `null` and `undefined` become the empty string.

0 commit comments

Comments
 (0)