-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix) Don't step out of if block on else if (#874)
`else if`s are represented with an if block node inside them, which is correctly handled when entering, but when leaving it would previously incorrectly step out of the if block leading to an internal error.
- Loading branch information
1 parent
4411fce
commit bb40cb8
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/svelte2tsx/test/htmlx2jsx/samples/nested-if-else-if-and-each-block/expected.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<>{(true) ? <> | ||
{(true) ? <></> : (true) ? <></> : <></> } | ||
</> : <> | ||
{__sveltets_each([], (_) => /*Ωignore_startΩ*/(!(true)) && /*Ωignore_endΩ*/<></>)} | ||
</> }</> |
5 changes: 5 additions & 0 deletions
5
packages/svelte2tsx/test/htmlx2jsx/samples/nested-if-else-if-and-each-block/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{#if true} | ||
{#if true}{:else if true}{/if} | ||
{:else} | ||
{#each [] as _}{/each} | ||
{/if} |