Fix removing next link during strip whitespaces for first element.

pull/1790/head
Yury Zhuravlev 6 years ago
parent c0ba6fb4ef
commit 0d797ea8ae

@ -120,10 +120,6 @@ export default class FragmentWrapper {
if (!first.data) { if (!first.data) {
first.var = null; first.var = null;
this.nodes.shift(); this.nodes.shift();
if (this.nodes.length) {
link(null, this.nodes[0]);
}
} }
} }
} }

@ -0,0 +1,12 @@
export default {
data: {
visible: false
},
html: '<div><div>before me</div></div>',
test ( assert, component, target ) {
component.set({ visible: true });
assert.htmlEqual(target.innerHTML, '<div><div>i am visible</div><div>before me</div></div>' );
}
};

@ -0,0 +1,6 @@
<div>
{#if visible}
<div>i am visible</div>
{/if}
<div>before me</div>
</div>
Loading…
Cancel
Save