mirror of https://github.com/sveltejs/svelte
This is a fix for when an elseif doesn't have a final else, and the following error was thrown: ``` TypeError: Cannot read property 'o' of undefined ``` See https://svelte.technology/repl?version=2.12.0&gist=c33d308077447f8ba06b79d8ef5ab1e4pull/1688/head
parent
4890d4dc02
commit
96c4455af9
@ -0,0 +1 @@
|
||||
<div></div>
|
@ -0,0 +1,8 @@
|
||||
export default {
|
||||
nestedTransitions: true,
|
||||
|
||||
test ( assert, component, target ) {
|
||||
// Would cause "TypeError: Cannot read property 'o' of undefined"
|
||||
component.set({ foo: false });
|
||||
}
|
||||
};
|
@ -0,0 +1,16 @@
|
||||
{#if foo}
|
||||
{#if false}
|
||||
<Component/>
|
||||
{:elseif false}
|
||||
<Component/>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
Component: './Component.html',
|
||||
},
|
||||
data: () => ({ foo: true }),
|
||||
}
|
||||
</script>
|
Loading…
Reference in new issue