File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed
packages/svelte/src/internal/client/dom/blocks Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -196,22 +196,15 @@ export class Boundary {
196196 }
197197
198198 #show_pending_snippet( ) {
199- const pending = this . #props. pending ;
199+ const pending = /** @type { (anchor: Node) => void } */ ( this . #props. pending ) ;
200200
201- if ( pending !== undefined ) {
202- // TODO can this be false?
203- if ( this . #main_effect !== null ) {
204- this . #offscreen_fragment = document . createDocumentFragment ( ) ;
205- move_effect ( this . #main_effect, this . #offscreen_fragment) ;
206- }
201+ if ( this . #main_effect !== null ) {
202+ this . #offscreen_fragment = document . createDocumentFragment ( ) ;
203+ move_effect ( this . #main_effect, this . #offscreen_fragment) ;
204+ }
207205
208- if ( this . #pending_effect === null ) {
209- this . #pending_effect = branch ( ( ) => pending ( this . #anchor) ) ;
210- }
211- } else if ( this . parent ) {
212- throw new Error ( 'TODO show pending snippet on parent' ) ;
213- } else {
214- throw new Error ( 'no pending snippet to show' ) ;
206+ if ( this . #pending_effect === null ) {
207+ this . #pending_effect = branch ( ( ) => pending ( this . #anchor) ) ;
215208 }
216209 }
217210
You can’t perform that action at this time.
0 commit comments