diff --git a/app/js/app.js b/app/js/app.js index f81e5b52..96d218ee 100755 --- a/app/js/app.js +++ b/app/js/app.js @@ -2,11 +2,13 @@ angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable', .run(['$rootScope', '$location', '$window', '$document', '$state', 'commonArray', 'shipPurpose', 'shipSize', 'hardPointClass', 'GroupMap', 'Persist', function($rootScope, $location, $window, $doc, $state, CArr, shipPurpose, sz, hpc, GroupMap, Persist) { // App is running as a standalone web app on tablet/mobile - var isStandAlone = false; + var isStandAlone; // This was causing issues on Windows phones ($window.external was causing Angular js to throw an exception). Backup is to try this and set isStandAlone to false if this fails. try { isStandAlone = $window.navigator.standalone || ($window.external && $window.external.msIsSiteMode && $window.external.msIsSiteMode()); - } catch (ex) { } + } catch (ex) { + isStandAlone = false; + } // Redirect any state transition errors to the error controller/state $rootScope.$on('$stateChangeError', function(e, toState, toParams, fromState, fromParams, error) {