From 2c901a3d6a35d03545d37f260814df6b88e24fab Mon Sep 17 00:00:00 2001 From: DAB0mB Date: Tue, 20 Dec 2016 22:26:24 -0200 Subject: [PATCH] Step 1.7: Check if cordova exists --- src/app/app.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f410c6423..613ab9a80 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -15,8 +15,10 @@ export class MyApp { platform.ready().then(() => { // Okay, so the platform is ready and our plugins are available. // Here you can do any higher level native things you might need. - StatusBar.styleDefault(); - Splashscreen.hide(); + if (window.hasOwnProperty('cordova')) { + StatusBar.styleDefault(); + Splashscreen.hide(); + } }); } }