From 7c1f4e873e26d6c6416dd7a2a14de60946665a53 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 30 Apr 2022 14:34:21 -0400 Subject: [PATCH] update docs --- site/content/docs/02-template-syntax.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 00070e563c..a84bfd64ce 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -465,16 +465,16 @@ The `{@const ...}` tag defines a local constant. ```sv {#each boxes as box} - {@const area = box.width * box.height} + {@const area = box.width * box.height} {box.width} * {box.height} = {area} {/each} ``` -`{@const}` is only allowed as direct child of `{#each}`, `{:then}`, `{:catch}`, `` or ``. +`{@const}` is only allowed as direct child of `{#if}`, `{:else if}`, `{:else}`, `{#each}`, `{:then}`, `{:catch}`, `` or ``. ### Element directives