|
|
|
|
@ -1,8 +1,7 @@
|
|
|
|
|
import { EFFECT_TRANSPARENT } from '../../constants.js';
|
|
|
|
|
import { hydrate_end, hydrate_start, hydrating, set_hydrating } from '../hydration.js';
|
|
|
|
|
import { hydrating, remove_hydrate_nodes, set_hydrating } from '../hydration.js';
|
|
|
|
|
import { block, branch, pause_effect, resume_effect } from '../../reactivity/effects.js';
|
|
|
|
|
import { HYDRATION_END_ELSE } from '../../../../constants.js';
|
|
|
|
|
import { remove_nodes } from '../operations.js';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param {Comment} anchor
|
|
|
|
|
@ -42,7 +41,7 @@ export function if_block(
|
|
|
|
|
if (condition === is_else) {
|
|
|
|
|
// Hydration mismatch: remove everything inside the anchor and start fresh.
|
|
|
|
|
// This could happen with `{#if browser}...{/if}`, for example
|
|
|
|
|
remove_nodes(hydrate_start, hydrate_end);
|
|
|
|
|
remove_hydrate_nodes();
|
|
|
|
|
set_hydrating(false);
|
|
|
|
|
mismatch = true;
|
|
|
|
|
}
|
|
|
|
|
|