mirror of https://github.com/sveltejs/svelte
fix simple if blocks with top-level or conditions (#532)
parent
8e87c688ae
commit
f74941b293
@ -0,0 +1,15 @@
|
||||
export default {
|
||||
data: {
|
||||
a: true,
|
||||
b: false
|
||||
},
|
||||
|
||||
html: '<p>i am visible</p>',
|
||||
|
||||
test ( assert, component, target ) {
|
||||
component.set({ a: false });
|
||||
assert.htmlEqual( target.innerHTML, '' );
|
||||
component.set({ b: true });
|
||||
assert.htmlEqual( target.innerHTML, '<p>i am visible</p>' );
|
||||
}
|
||||
};
|
@ -0,0 +1,3 @@
|
||||
{{#if a || b}}
|
||||
<p>i am visible</p>
|
||||
{{/if}}
|
Loading…
Reference in new issue