summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2020-05-11 09:37:21 -0400
committerPliable Pixels <pliablepixels@gmail.com>2020-05-11 09:37:21 -0400
commitadaaec08f156c45a06f76741d12a437b32a36053 (patch)
treefd96e07b8a490fc834bee6b932f18fadaa838cd6 /www/js/app.js
parent1c4d642f737365dbece72dda22d4c32097cb62e3 (diff)
disregard state transition before init is complete
Diffstat (limited to 'www/js/app.js')
-rwxr-xr-xwww/js/app.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/www/js/app.js b/www/js/app.js
index 09365be6..95200bc8 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -1122,6 +1122,7 @@ angular.module('zmApp', [
//console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>INSIDE RUN");
NVR.log("******* app .run device ready");
+
$fileLogger.setStorageFilename(zm.logFile);
$fileLogger.setTimestampFormat('MMM d, y ' + NVR.getTimeFormatSec());
@@ -1517,6 +1518,15 @@ angular.module('zmApp', [
//----------------------------------------------------------------------------
$rootScope.$on('$stateChangeStart', function (event, toState, toParams) {
+
+
+ if (!$rootScope.initComplete) {
+ NVR.debug ("---> Init not complete, ignoring state change request to "+toState.name);
+ event.preventDefault();
+ return;
+
+ };
+
var requireLogin = toState.data.requireLogin;
$rootScope.dpadId = 0;