From 66cba23d9c3a6276e5713250a8ef37474a3a4888 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 25 Nov 2018 17:04:04 -0500 Subject: [PATCH] Redirect to the index page when rebooting the app from the settings page --- assets/javascripts/app/app.coffee | 2 +- assets/javascripts/app/appcache.coffee | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/assets/javascripts/app/app.coffee b/assets/javascripts/app/app.coffee index e90f1d61..ab67a92a 100644 --- a/assets/javascripts/app/app.coffee +++ b/assets/javascripts/app/app.coffee @@ -158,7 +158,7 @@ @updateChecker = new app.UpdateChecker() reboot: -> - if location.pathname isnt '/' + if location.pathname isnt '/' and location.pathname isnt '/settings' window.location = "/##{location.pathname}" else window.location = '/' diff --git a/assets/javascripts/app/appcache.coffee b/assets/javascripts/app/appcache.coffee index 8ad83904..235cae02 100644 --- a/assets/javascripts/app/appcache.coffee +++ b/assets/javascripts/app/appcache.coffee @@ -27,11 +27,7 @@ class app.AppCache return reload: -> - $.on @cache, 'updateready noupdate error', -> - if location.pathname isnt '/' - window.location = "/##{location.pathname}" - else - window.location = '/' + $.on @cache, 'updateready noupdate error', -> app.reboot() @notifyUpdate = false @notifyProgress = true try @cache.update() catch