@@ -125,20 +125,14 @@ Suspense.prototype._childDidSuspend = function (promise, suspendingVNode) {
125125 }
126126 c . _suspenders . push ( suspendingComponent ) ;
127127
128- const resolve = suspended ( c . _vnode ) ;
129-
130128 let resolved = false ;
131129 const onResolved = ( ) => {
132130 if ( resolved ) return ;
133131
134132 resolved = true ;
135133 suspendingComponent . _onResolve = null ;
136134
137- if ( resolve ) {
138- resolve ( onSuspensionComplete ) ;
139- } else {
140- onSuspensionComplete ( ) ;
141- }
135+ onSuspensionComplete ( ) ;
142136 } ;
143137
144138 suspendingComponent . _onResolve = onResolved ;
@@ -218,29 +212,6 @@ Suspense.prototype.render = function (props, state) {
218212 ] ;
219213} ;
220214
221- /**
222- * Checks and calls the parent component's _suspended method, passing in the
223- * suspended vnode. This is a way for a parent to get notified
224- * that one of its children/descendants suspended.
225- *
226- * The parent MAY return a callback. The callback will get called when the
227- * suspension resolves, notifying the parent of the fact.
228- * Moreover, the callback gets function `unsuspend` as a parameter. The resolved
229- * child descendant will not actually get unsuspended until `unsuspend` gets called.
230- * This is a way for the parent to delay unsuspending.
231- *
232- * If the parent does not return a callback then the resolved vnode
233- * gets unsuspended immediately when it resolves.
234- *
235- * @param {import('./internal').VNode } vnode
236- * @returns {((unsuspend: () => void) => void)? }
237- */
238- function suspended ( vnode ) {
239- /** @type {import('./internal').Component } */
240- let component = vnode . _parent . _component ;
241- return component && component . _suspended && component . _suspended ( vnode ) ;
242- }
243-
244215export function lazy ( loader ) {
245216 let prom ;
246217 let component ;
0 commit comments