summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-12-12 15:38:18 -0500
committerPliable Pixels <pliablepixels@gmail.com>2018-12-12 15:38:18 -0500
commite7491c6f082ae82b45722055135fa0d2a1f72653 (patch)
tree1119a1beee07d461ad47e85037191ed45b850ca2 /www/js/app.js
parent9df8dc17405edd3f9becb2623975f2bc6deaff14 (diff)
app state restore fix
Diffstat (limited to 'www/js/app.js')
-rwxr-xr-xwww/js/app.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/www/js/app.js b/www/js/app.js
index e735557b..6e400e94 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -2083,7 +2083,9 @@ angular.module('zmApp', [
localforage.getItem('last-desktop-state')
.then(function (succ) {
-// console.log("FOUND STATE" + JSON.stringify(succ) + ":" + succ);
+ console.log("FOUND STATE" + JSON.stringify(succ) + ":" + succ);
+
+ if (succ == null) succ = {name:"app.montage"};
// sanitize this
if (!succ.name || typeof succ.name !== 'string') {
@@ -2114,15 +2116,12 @@ angular.module('zmApp', [
}
loadServices();
}, function (err) {
- //console.log("ERR " + JSON.stringify(err));
+
+ console.log("ERR " + JSON.stringify(err));
+ $rootScope.lastState = "app.montage";
loadServices();
});
- } else
-
- {
-
- loadServices();
- }
+ }
function loadServices() {
NVRDataModel.log("Language file loaded, continuing with rest");