From c837195ae43fd8ee77a2db5dc376af76748eb101 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Tue, 27 May 2014 20:07:07 +0200 Subject: [PATCH] [fix] Do not attempt to postinstall if API is just unreachable --- js/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 9d62532f..812cfd41 100644 --- a/js/app.js +++ b/js/app.js @@ -363,6 +363,8 @@ app = Sammy('#main', function (sam) { if (isInstalled) { domain = window.location.hostname; c.view('login', { 'domain': domain }); + } else if (typeof isInstalled === 'undefined') { + setInterval(c.redirect('#/login'), 5000); } else { c.redirect('#/postinstall'); } @@ -407,7 +409,7 @@ app = Sammy('#main', function (sam) { sam.get('#/postinstall', function(c) { $('#masthead').hide(); c.checkInstall(function(isInstalled) { - if (isInstalled) { + if (isInstalled || typeof isInstalled === 'undefined') { c.redirect('#/login'); } else { c.view('postinstall/postinstall_1');