Skip to content

Commit 786e7ee

Browse files
committed
Update the docs with "?? []"
1 parent ba4b2eb commit 786e7ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

documentation/docs/20-core-concepts/60-remote-functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ If the submitted data doesn't pass the schema, the callback will not run. Instea
496496
<label>
497497
<h2>Title</h2>
498498

499-
+++ {#each createPost.fields.title.issues() as issue}
499+
+++ {#each createPost.fields.title.issues() ?? [] as issue}
500500
<p class="issue">{issue.message}</p>
501501
{/each}+++
502502

@@ -506,7 +506,7 @@ If the submitted data doesn't pass the schema, the callback will not run. Instea
506506
<label>
507507
<h2>Write your post</h2>
508508

509-
+++ {#each createPost.fields.content.issues() as issue}
509+
+++ {#each createPost.fields.content.issues() ?? [] as issue}
510510
<p class="issue">{issue.message}</p>
511511
{/each}+++
512512

@@ -552,7 +552,7 @@ For client-side validation, you can specify a _preflight_ schema which will popu
552552
To get a list of _all_ issues, rather than just those belonging to a single field, you can use the `fields.allIssues()` method:
553553
554554
```svelte
555-
{#each createPost.fields.allIssues() as issue}
555+
{#each createPost.fields.allIssues() ?? [] as issue}
556556
<p>{issue.message}</p>
557557
{/each}
558558
```

0 commit comments

Comments
 (0)