@@ -215,6 +215,10 @@ class EmberApp {
215
215
* the app instance and then visits the given route and destroys the app instance
216
216
* when the route is finished its render cycle.
217
217
*
218
+ * Ember apps can manually defer rendering in FastBoot mode if they're waiting
219
+ * on something async the router doesn't know about. This function fetches
220
+ * that promise for deferred rendering from the app.
221
+ *
218
222
* @param {string } path the URL path to render, like `/photos/1`
219
223
* @param {Object } fastbootInfo An object holding per request info
220
224
* @param {Object } bootOptions An object containing the boot options that are used by
@@ -235,7 +239,7 @@ class EmberApp {
235
239
} )
236
240
. then ( ( ) => result . instanceBooted = true )
237
241
. then ( ( ) => instance . visit ( path , bootOptions ) )
238
- . then ( ( ) => waitForApp ( instance ) )
242
+ . then ( ( ) => fastbootInfo . deferredPromise )
239
243
. then ( ( ) => instance ) ;
240
244
}
241
245
@@ -410,16 +414,6 @@ function buildBootOptions(shouldRender) {
410
414
} ;
411
415
}
412
416
413
- /*
414
- * Ember apps can manually defer rendering in FastBoot mode if they're waiting
415
- * on something async the router doesn't know about. This function fetches
416
- * that promise for deferred rendering from the app.
417
- */
418
- function waitForApp ( instance ) {
419
- let fastbootInfo = instance . lookup ( 'info:-fastboot' ) ;
420
- return fastbootInfo . deferredPromise ;
421
- }
422
-
423
417
/*
424
418
* Writes the shoebox into the DOM for the browser rendered app to consume.
425
419
* Uses a script tag with custom type so that the browser will treat as plain
0 commit comments