@@ -215,6 +215,10 @@ class EmberApp {
215215 * the app instance and then visits the given route and destroys the app instance
216216 * when the route is finished its render cycle.
217217 *
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+ *
218222 * @param {string } path the URL path to render, like `/photos/1`
219223 * @param {Object } fastbootInfo An object holding per request info
220224 * @param {Object } bootOptions An object containing the boot options that are used by
@@ -235,7 +239,7 @@ class EmberApp {
235239 } )
236240 . then ( ( ) => result . instanceBooted = true )
237241 . then ( ( ) => instance . visit ( path , bootOptions ) )
238- . then ( ( ) => waitForApp ( instance ) )
242+ . then ( ( ) => fastbootInfo . deferredPromise )
239243 . then ( ( ) => instance ) ;
240244 }
241245
@@ -410,16 +414,6 @@ function buildBootOptions(shouldRender) {
410414 } ;
411415}
412416
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-
423417/*
424418 * Writes the shoebox into the DOM for the browser rendered app to consume.
425419 * Uses a script tag with custom type so that the browser will treat as plain
0 commit comments