pull/7146/merge
GHOST 5 years ago committed by GitHub
commit d9c888cb9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,7 +63,7 @@ export default class EachBlock extends AbstractBlock {
([this.const_tags, this.children] = get_const_tags(info.children, component, this, this)); ([this.const_tags, this.children] = get_const_tags(info.children, component, this, this));
if (this.has_animation) { if (this.has_animation) {
this.children = this.children.filter(child => !isEmptyNode(child)); this.children = this.children.filter(child => !(child.type == 'Comment' || isEmptyNode(child)));
if (this.children.length !== 1) { if (this.children.length !== 1) {
const child = this.children.find(child => !!(child as Element).animation); const child = this.children.find(child => !!(child as Element).animation);

@ -0,0 +1,11 @@
<script>
function flip() {}
</script>
<div>
{#each [] as n (n)}
<!-- Comment -->
<!-- <div animate:flip></div> -->
<div animate:flip />
{/each}
</div>
Loading…
Cancel
Save