mirror of https://github.com/sveltejs/svelte
Merge pull request #533 from sveltejs/gh-532
fix simple if blocks with top-level or conditions (#532)pull/542/head
commit
a665825c68
@ -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