summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorRobert Zorko <robertz@gurucue.com>2015-12-14 15:55:39 +0100
committerRobert Zorko <robertz@gurucue.com>2015-12-14 15:55:39 +0100
commit2d4b5b535c2a3df875a0a3c97cdd25ed67275b29 (patch)
treecf0152e1f7b11deaacb51034dc597d2a5518515b /js
parent3fbcf26d59e6cd7e8c10cb4f3ae912810c6d8d1a (diff)
fixed the bug with the overlay not beeing hidden after server times out
Diffstat (limited to 'js')
-rw-r--r--js/codeq/core.js10
-rw-r--r--js/codeq/navigation.js2
2 files changed, 8 insertions, 4 deletions
diff --git a/js/codeq/core.js b/js/codeq/core.js
index cb6f54c..22f6a50 100644
--- a/js/codeq/core.js
+++ b/js/codeq/core.js
@@ -610,9 +610,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
codeq.log.info('App reset: ' + (reason || 'no reason given'));
codeq.globalStateMachine.transition('login');
codeq.wait(
- codeq.comms.logout()
- .finally(codeq.comms.disconnect)
- .fail(function () {}) // ignore errors
+ codeq.comms.getSid() == null ? Q() : codeq.comms.logout()
+ .finally(
+ codeq.comms.disconnect
+ )
+ .fail(function (e) {
+ codeq.log.debug(e)
+ }) // ignore errors
)
.then(function () {
if (reason) {
diff --git a/js/codeq/navigation.js b/js/codeq/navigation.js
index da2b04a..62344e5 100644
--- a/js/codeq/navigation.js
+++ b/js/codeq/navigation.js
@@ -91,9 +91,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
name = 'login';//this will cause the following code to transition to the login state instead of the original one given
}
-
var newState = def[name];//if the newState is not the same as the old or if it doesn't exist at all is already checked at this point
if (currState) currState.exit();
+
currState = newState;
currState.enter.apply(currState, Array.prototype.slice.apply(arguments, [1]));
}