Commit 67aa628f authored by Randall Leeds's avatar Randall Leeds

Don't try to flash messages on null host page

This was causing a race condition on app startup. Now, the worst that
happens is the flash message shows in the sidebar.
parent 275651a0
......@@ -20,7 +20,7 @@ class FlashProvider
if msgs.length
msg = msgs.shift()
unless q then [q, msg] = msg
if annotator.isOpen()
if annotator.isOpen() or not annotator.host
notice = Annotator.showNotification msg, q
@timeout = this._wait =>
# work around Annotator.Notification not removing classes
......@@ -87,4 +87,4 @@ angular.module('h.flash', ['ngResource'])
.factory('flashInterceptor', flashInterceptor)
.config(['$httpProvider', ($httpProvider) ->
$httpProvider.interceptors.push 'flashInterceptor'
])
\ No newline at end of file
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment