fix(desktop): fix error if StatusBar is not available

This commit is contained in:
Jason Dreyzehner 2016-10-12 14:03:36 -04:00
commit 8c992569d5

View file

@ -6,7 +6,7 @@ angular.module('copayApp.services').service('startupService', function($log, $ti
var statusBarVisible = false; var statusBarVisible = false;
function _hideSplash(){ function _hideSplash(){
if(navigator.splashscreen && splashscreenVisible){ if(typeof navigator.splashscreen !== "undefined" && splashscreenVisible){
$log.debug('startupService is hiding the splashscreen...'); $log.debug('startupService is hiding the splashscreen...');
$timeout(function(){ $timeout(function(){
navigator.splashscreen.hide(); navigator.splashscreen.hide();
@ -15,7 +15,7 @@ angular.module('copayApp.services').service('startupService', function($log, $ti
} }
} }
function _showStatusBar(){ function _showStatusBar(){
if(StatusBar && !statusBarVisible){ if(typeof StatusBar !== "undefined" && !statusBarVisible){
$log.debug('startupService is showing the StatusBar...'); $log.debug('startupService is showing the StatusBar...');
StatusBar.show(); StatusBar.show();
statusBarVisible = true; statusBarVisible = true;