deduplicate

pull/10870/head
Rich Harris 2 years ago
parent 6964a076bf
commit 469c44ea9c

@ -90,11 +90,6 @@ export function if_block(anchor, get_condition, consequent_fn, alternate_fn, els
consequent_fn(anchor);
consequent_dom = block.d;
if (mismatch) {
// Set fragment so that Svelte continues to operate in hydration mode
set_current_hydration_fragment([]);
}
return () => {
// TODO make this unnecessary by linking the dom to the effect,
// and removing automatically on teardown
@ -124,11 +119,6 @@ export function if_block(anchor, get_condition, consequent_fn, alternate_fn, els
alternate_fn(anchor);
alternate_dom = block.d;
if (mismatch) {
// Set fragment so that Svelte continues to operate in hydration mode
set_current_hydration_fragment([]);
}
return () => {
// TODO make this unnecessary by linking the dom to the effect,
// and removing automatically on teardown
@ -150,6 +140,11 @@ export function if_block(anchor, get_condition, consequent_fn, alternate_fn, els
});
}
}
if (mismatch) {
// Set fragment so that Svelte continues to operate in hydration mode
set_current_hydration_fragment([]);
}
}, block);
if (elseif) {

Loading…
Cancel
Save