From 251f3ec09ef9ac99f273be2051be12ebb3a63c3c Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 15 May 2020 10:09:55 -0400 Subject: make sure first use state works - initComplete doesn't block it! --- www/js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 3dde24f1..26fef2fb 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1520,7 +1520,7 @@ angular.module('zmApp', [ $rootScope.$on('$stateChangeStart', function (event, toState, toParams) { - if (!$rootScope.initComplete) { + if (!$rootScope.initComplete && toState.name!= 'app.first-use') { NVR.debug ("---> Init not complete, ignoring state change request to "+toState.name); event.preventDefault(); return; @@ -1832,6 +1832,7 @@ angular.module('zmApp', [ NVR.debug("isFirstUse returned: " + val); if (val == null || val == true) { NVR.log("First time detected "); + $rootScope.initComplete = true; $state.go("app.first-use"); return; -- cgit v1.2.3