File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ class EmberApp {
190190 * @param {string } path the URL path to render, like `/photos/1`
191191 * @param {Object } options
192192 * @param {string } [options.html] the HTML document to insert the rendered app into
193- * @param {ClientRequest }
193+ * @param {ClientRequest }
194194 * @returns {Promise<Result> } result
195195 */
196196 visit ( path , options ) {
@@ -218,6 +218,7 @@ class EmberApp {
218218
219219 return instance . boot ( bootOptions ) ;
220220 } )
221+ . then ( ( ) => result . instanceBooted = true )
221222 . then ( ( ) => instance . visit ( path , bootOptions ) )
222223 . then ( ( ) => waitForApp ( instance ) )
223224 . then ( ( ) => createShoebox ( doc , fastbootInfo ) )
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ const HTMLSerializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);
99 * method.
1010 */
1111class Result {
12- constructor ( options ) {
12+ constructor ( options ) {
13+ this . instanceBooted = false ;
1314 this . _doc = options . doc ;
1415 this . _html = options . html ;
1516 this . _fastbootInfo = options . fastbootInfo ;
@@ -70,8 +71,10 @@ class Result {
7071 return this ;
7172 }
7273
73- _finalizeMetadata ( instance ) {
74- this . url = instance . getURL ( ) ;
74+ _finalizeMetadata ( instance ) {
75+ if ( this . instanceBooted ) {
76+ this . url = instance . getURL ( ) ;
77+ }
7578
7679 let response = this . _fastbootInfo . response ;
7780
You can’t perform that action at this time.
0 commit comments