@@ -122,20 +122,14 @@ Suspense.prototype._childDidSuspend = function (promise, suspendingVNode) {
122122 }
123123 c . _suspenders . push ( suspendingComponent ) ;
124124
125- const resolve = suspended ( c . _vnode ) ;
126-
127125 let resolved = false ;
128126 const onResolved = ( ) => {
129127 if ( resolved ) return ;
130128
131129 resolved = true ;
132130 suspendingComponent . _onResolve = null ;
133131
134- if ( resolve ) {
135- resolve ( onSuspensionComplete ) ;
136- } else {
137- onSuspensionComplete ( ) ;
138- }
132+ onSuspensionComplete ( ) ;
139133 } ;
140134
141135 suspendingComponent . _onResolve = onResolved ;
@@ -215,29 +209,6 @@ Suspense.prototype.render = function (props, state) {
215209 ] ;
216210} ;
217211
218- /**
219- * Checks and calls the parent component's _suspended method, passing in the
220- * suspended vnode. This is a way for a parent to get notified
221- * that one of its children/descendants suspended.
222- *
223- * The parent MAY return a callback. The callback will get called when the
224- * suspension resolves, notifying the parent of the fact.
225- * Moreover, the callback gets function `unsuspend` as a parameter. The resolved
226- * child descendant will not actually get unsuspended until `unsuspend` gets called.
227- * This is a way for the parent to delay unsuspending.
228- *
229- * If the parent does not return a callback then the resolved vnode
230- * gets unsuspended immediately when it resolves.
231- *
232- * @param {import('./internal').VNode } vnode
233- * @returns {((unsuspend: () => void) => void)? }
234- */
235- function suspended ( vnode ) {
236- /** @type {import('./internal').Component } */
237- let component = vnode . _parent . _component ;
238- return component && component . _suspended && component . _suspended ( vnode ) ;
239- }
240-
241212export function lazy ( loader ) {
242213 let prom ;
243214 let component ;
0 commit comments