diff options
-rw-r--r-- | javascripts/dashing.coffee | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/javascripts/dashing.coffee b/javascripts/dashing.coffee index e5875d8..c66128d 100644 --- a/javascripts/dashing.coffee +++ b/javascripts/dashing.coffee @@ -40,7 +40,12 @@ class Dashing.Widget extends Batman.View @mixin($(@node).data()) Dashing.widgets[@id] ||= [] Dashing.widgets[@id].push(@) - @mixin(Dashing.lastEvents[@id]) # in case the events from the server came before the widget was rendered + + # In case the events from the server came before the widget was rendered + lastData = Dashing.lastEvents[@id] + if lastData + @mixin(lastData) + @onData(lastData) type = Batman.Filters.dashize(@view) $(@node).addClass("widget widget-#{type} #{@id}") |