|
|
|
@ -81,8 +81,7 @@ export function set_text(text, value) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export function mount(component, options) {
|
|
|
|
export function mount(component, options) {
|
|
|
|
const anchor = options.anchor ?? options.target.appendChild(empty());
|
|
|
|
const anchor = options.anchor ?? options.target.appendChild(empty());
|
|
|
|
// Don't flush previous effects to ensure order of outer effects stays consistent
|
|
|
|
return _mount(component, { ...options, anchor });
|
|
|
|
return flush_sync(() => _mount(component, { ...options, anchor }), false);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -115,8 +114,6 @@ export function hydrate(component, options) {
|
|
|
|
const previous_hydrate_node = hydrate_node;
|
|
|
|
const previous_hydrate_node = hydrate_node;
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
// Don't flush previous effects to ensure order of outer effects stays consistent
|
|
|
|
|
|
|
|
return flush_sync(() => {
|
|
|
|
|
|
|
|
var anchor = /** @type {TemplateNode} */ (target.firstChild);
|
|
|
|
var anchor = /** @type {TemplateNode} */ (target.firstChild);
|
|
|
|
while (
|
|
|
|
while (
|
|
|
|
anchor &&
|
|
|
|
anchor &&
|
|
|
|
@ -145,8 +142,7 @@ export function hydrate(component, options) {
|
|
|
|
|
|
|
|
|
|
|
|
set_hydrating(false);
|
|
|
|
set_hydrating(false);
|
|
|
|
|
|
|
|
|
|
|
|
return instance;
|
|
|
|
return /** @type {Exports} */ (instance);
|
|
|
|
}, false);
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
if (error === HYDRATION_ERROR) {
|
|
|
|
if (error === HYDRATION_ERROR) {
|
|
|
|
// TODO it's possible for event listeners to have been added and
|
|
|
|
// TODO it's possible for event listeners to have been added and
|
|
|
|
|