diff --git a/src/module-mocks.js b/src/module-mocks.js index e4ba8fac..245a38e4 100644 --- a/src/module-mocks.js +++ b/src/module-mocks.js @@ -1 +1,4 @@ -var ngCordovaMocks = angular.module('ngCordovaMocks', []); \ No newline at end of file +var ngCordovaMocks = angular.module('ngCordovaMocks', []); +ngCordovaMocks.config(['$qProvider', function ($qProvider) { + $qProvider.errorOnUnhandledRejections(false); +}]); \ No newline at end of file diff --git a/src/plugins/splashscreen.js b/src/plugins/splashscreen.js index 8479246b..52a9a81c 100644 --- a/src/plugins/splashscreen.js +++ b/src/plugins/splashscreen.js @@ -6,12 +6,12 @@ angular.module('ngCordova.plugins.splashscreen', []) .factory('$cordovaSplashscreen', [function () { return { - hide: function () { - return navigator.splashscreen.hide(); + hide: function() { + return navigator.splashscreen ? navigator.splashscreen.hide() : null; }, - show: function () { - return navigator.splashscreen.show(); + show: function() { + return navigator.splashscreen ? navigator.splashscreen.show() : null; } };