mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Redirect to the index page when rebooting the app from the settings page
This commit is contained in:
parent
bf003669ba
commit
66cba23d9c
2 changed files with 2 additions and 6 deletions
|
@ -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 = '/'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue