 
   @::on 'ready', ->
     Dashing.Widget.fire 'ready'
+
+    # In case the events from the server came before the widget was rendered
+    lastData = Dashing.lastEvents[@id]
+    if lastData
+      @mixin(lastData)
+      @onData(lastData)
 
   receiveData: (data) =>
     @mixin(data)

  if lastEvents[data.id]?.updatedAt != data.updatedAt
    if Dashing.debugMode
      console.log("Received data for #{data.id}", data)
    if widgets[data.id]?.length > 0
      lastEvents[data.id] = data
      for widget in widgets[data.id]
        widget.receiveData(data)


    @mixin($(@node).data())
    Dashing.widgets[@id] ||= []
    Dashing.widgets[@id].push(@)

    type = Batman.Filters.dashize(@view)
    $(@node).addClass("widget widget-#{type} #{@id}")
