Skip to content

Commit

Permalink
revert previous #2086 fix in favour of #3113
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jul 4, 2019
1 parent a28dfb2 commit 7512830
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/compiler/compile/render_dom/wrappers/Element/index.ts
Expand Up @@ -272,7 +272,7 @@ export default class ElementWrapper extends Wrapper {
);

if (parent_node === '@_document.head') {
block.builders.destroy.add_conditional('detaching', `@detach(${node});`);
block.builders.destroy.add_line(`@detach(${node});`);
}
} else {
block.builders.mount.add_line(`@insert(#target, ${node}, anchor);`);
Expand Down
6 changes: 2 additions & 4 deletions test/js/samples/head-no-whitespace/expected.js
Expand Up @@ -33,10 +33,8 @@ function create_fragment(ctx) {
o: noop,

d(detaching) {
if (detaching) {
detach(meta0);
detach(meta1);
}
detach(meta0);
detach(meta1);
}
};
}
Expand Down

0 comments on commit 7512830

Please sign in to comment.