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,10 +51,12 @@ 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);
boundary(/** @type {*} */ (anchor), { pending: () => {} }, (anchor) => {
branch(() => { branch(() => {
Component(anchor, props); Component(anchor, props);
}); });
}); });
});
cleanup(); cleanup();
return unmount; return unmount;
} }

Loading…
Cancel
Save