fix: wrap component in boundary in `render`

pull/18058/head
paoloricciuti 5 months ago
parent 6d13e5a1d0
commit a59efbf610

@ -1,3 +1,4 @@
import { boundary } from '../dom/blocks/boundary.js';
import { branch, effect_root } from '../reactivity/effects.js'; import { branch, effect_root } from '../reactivity/effects.js';
import { push_renderer } from './state.js'; import { push_renderer } from './state.js';
@ -50,8 +51,10 @@ export function createRenderer(renderer) {
const unmount = effect_root(() => { const unmount = effect_root(() => {
var anchor = renderer.createComment(''); var anchor = renderer.createComment('');
renderer.insert(target, anchor, null); renderer.insert(target, anchor, null);
branch(() => { boundary(/** @type {*} */ (anchor), { pending: () => {} }, (anchor) => {
Component(anchor, props); branch(() => {
Component(anchor, props);
});
}); });
}); });
cleanup(); cleanup();

Loading…
Cancel
Save