History

Fix race condition on offline page

Thibaut committed 11 years ago

Commit 8ec7c851 parent f0c1ec71 file · +4 −0Browse files

Unified · Split

assets/javascripts/views/content/offline_page.coffee+4−0
@@ -62,13 +62,17 @@ class app.views.OfflinePage extends app.View · 61 unmodified lines
6262 return
6363
6464 onInstallSuccess: (doc) ->
65+ return unless @activated
6566 doc.getInstallStatus (status) =>
67+ return unless @activated
6668 @docEl(doc).outerHTML = @renderDoc(doc, status)
6769 $.highlight @docEl(doc), className: '_highlight'
6870 @refreshLinks()
71+ return
6972 return
7073
7174 onInstallError: (doc) ->
75+ return unless @activated
7276 el = @docEl(doc)
7377 el.lastElementChild.textContent = 'Error'
7478 return