From b8ce4023c326f385ca6cd02faf2356b9d3d3a6a6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 14 Sep 2017 13:42:48 -0400 Subject: [PATCH] finish redirect if success returned 5x, via installer --- public/src/installer/install.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/src/installer/install.js b/public/src/installer/install.js index bccd3dd08d..9fa8a248c7 100644 --- a/public/src/installer/install.js +++ b/public/src/installer/install.js @@ -115,12 +115,14 @@ $('document').ready(function () { $('#launch .fa-spin').removeClass('hide'); $.post('/launch', function () { - var checker = setInterval(function () { + var successCount = 0; + setInterval(function () { $.get('/admin').done(function () { - clearInterval(checker); - setTimeout(function () { + if (successCount >= 5) { window.location = 'admin'; - }, 2000); + } else { + successCount += 1; + } }); }, 750); });