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
62 return62 return
63 63
64 onInstallSuccess: (doc) ->64 onInstallSuccess: (doc) ->
65 return unless @activated
65 doc.getInstallStatus (status) =>66 doc.getInstallStatus (status) =>
67 return unless @activated
66 @docEl(doc).outerHTML = @renderDoc(doc, status)68 @docEl(doc).outerHTML = @renderDoc(doc, status)
67 $.highlight @docEl(doc), className: '_highlight'69 $.highlight @docEl(doc), className: '_highlight'
68 @refreshLinks()70 @refreshLinks()
71 return
69 return72 return
70 73
71 onInstallError: (doc) ->74 onInstallError: (doc) ->
75 return unless @activated
72 el = @docEl(doc)76 el = @docEl(doc)
73 el.lastElementChild.textContent = 'Error'77 el.lastElementChild.textContent = 'Error'
74 return78 return