mirror of https://github.com/sveltejs/svelte
fixed removal of empty stylesheets created from transitions (#7662)
Co-authored-by: Mathias Picker <mattis123@live.no>pull/7697/head
parent
05b5be0469
commit
26d1455b27
@ -0,0 +1,14 @@
|
||||
export default {
|
||||
skip_if_ssr: true,
|
||||
skip_if_hydrate: true,
|
||||
skip_if_hydrate_from_ssr: true,
|
||||
test({ raf, assert, component, window }) {
|
||||
component.visible = true;
|
||||
raf.tick(100);
|
||||
component.visible = false;
|
||||
raf.tick(200);
|
||||
raf.tick(0);
|
||||
|
||||
assert.htmlEqual(window.document.head.innerHTML, '');
|
||||
}
|
||||
};
|
@ -0,0 +1,14 @@
|
||||
<script>
|
||||
export let visible = false;
|
||||
|
||||
function foo() {
|
||||
return {
|
||||
duration: 100,
|
||||
css: () => ''
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if visible}
|
||||
<div transition:foo></div>
|
||||
{/if}
|
Loading…
Reference in new issue