Skip to content

Commit a479099

Browse files
author
Alexander Vakrilov
authored
fix(hmr): After HMR app is blank when re-launched (#2108)
1 parent fdf721f commit a479099

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Diff for: nativescript-angular/platform-common.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,8 @@ export class NativeScriptPlatformRef extends PlatformRef {
191191
@profile
192192
private bootstrapNativeScriptApp() {
193193
const autoCreateFrame = !!this.appOptions.createFrameOnBootstrap;
194-
let tempAppHostView: AppHostView;
195194
let rootContent: View;
196195

197-
if (autoCreateFrame) {
198-
const { page, frame } = this.createFrameAndPage(false);
199-
setRootPage(page);
200-
rootContent = frame;
201-
} else {
202-
// Create a temp page for root of the renderer
203-
tempAppHostView = new AppHostView();
204-
setRootPage(<any>tempAppHostView);
205-
}
206-
207196
if (isLogEnabled()) {
208197
bootstrapLog("NativeScriptPlatform bootstrap started.");
209198
}
@@ -214,6 +203,17 @@ export class NativeScriptPlatformRef extends PlatformRef {
214203
bootstrapLog("Application launch event fired");
215204
}
216205

206+
let tempAppHostView: AppHostView;
207+
if (autoCreateFrame) {
208+
const { page, frame } = this.createFrameAndPage(false);
209+
setRootPage(page);
210+
rootContent = frame;
211+
} else {
212+
// Create a temp page for root of the renderer
213+
tempAppHostView = new AppHostView();
214+
setRootPage(<any>tempAppHostView);
215+
}
216+
217217
let bootstrapPromiseCompleted = false;
218218
this._bootstrapper().then(
219219
moduleRef => {

0 commit comments

Comments
 (0)