Skip to content

Commit 66cba23

Browse files
committed
Redirect to the index page when rebooting the app from the settings page
1 parent bf00366 commit 66cba23

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

assets/javascripts/app/app.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
@updateChecker = new app.UpdateChecker()
159159

160160
reboot: ->
161-
if location.pathname isnt '/'
161+
if location.pathname isnt '/' and location.pathname isnt '/settings'
162162
window.location = "/##{location.pathname}"
163163
else
164164
window.location = '/'

assets/javascripts/app/appcache.coffee

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ class app.AppCache
2727
return
2828

2929
reload: ->
30-
$.on @cache, 'updateready noupdate error', ->
31-
if location.pathname isnt '/'
32-
window.location = "/##{location.pathname}"
33-
else
34-
window.location = '/'
30+
$.on @cache, 'updateready noupdate error', -> app.reboot()
3531
@notifyUpdate = false
3632
@notifyProgress = true
3733
try @cache.update() catch

0 commit comments

Comments
 (0)