From adaaec08f156c45a06f76741d12a437b32a36053 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 11 May 2020 09:37:21 -0400 Subject: disregard state transition before init is complete --- www/js/app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'www/js/app.js') 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; -- cgit v1.2.3