From 58feeb352942ad566e861c23a354f9471c41ffa4 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 17 Aug 2018 12:19:29 +0900 Subject: [PATCH] debug non null check --- src/app/app.component.html | 2 +- src/app/pages/home/home-page.component.html | 2 +- src/electron/main.ts | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index b40ef95..d6a492d 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/pages/home/home-page.component.html b/src/app/pages/home/home-page.component.html index 01ecb09..62e1f62 100644 --- a/src/app/pages/home/home-page.component.html +++ b/src/app/pages/home/home-page.component.html @@ -2,7 +2,7 @@
-

Home works!!!!

+

Home works!!

diff --git a/src/electron/main.ts b/src/electron/main.ts index d935bd5..6bbd9fa 100644 --- a/src/electron/main.ts +++ b/src/electron/main.ts @@ -429,15 +429,17 @@ function createWindow() { window.onDidLoad((data: any) => { window.show(); window.sendLaunchTimingStats({ - mainReadyTime: readyTime!, - loadTime: window.loadTime!, - rendererReadyTime: window.rendererReadyTime!, + mainReadyTime: readyTime ? readyTime : 0, + loadTime: window.loadTime ? window.loadTime : 0, + rendererReadyTime: window.rendererReadyTime ? window.rendererReadyTime : 0, }); - let fns = onDidLoadFns!; + const fns = onDidLoadFns ? onDidLoadFns : null; onDidLoadFns = null; - for (const fn of fns) { - fn(window); + if (fns) { + for (const fn of fns) { + fn(window); + } } });