summaryrefslogtreecommitdiff
path: root/javascripts/dashing.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'javascripts/dashing.coffee')
-rw-r--r--javascripts/dashing.coffee13
1 files changed, 7 insertions, 6 deletions
diff --git a/javascripts/dashing.coffee b/javascripts/dashing.coffee
index faf21a0..ebf5c0a 100644
--- a/javascripts/dashing.coffee
+++ b/javascripts/dashing.coffee
@@ -100,12 +100,13 @@ source.addEventListener 'error', (e)->
source.addEventListener 'message', (e) =>
data = JSON.parse(e.data)
- if Dashing.debugMode
- console.log("Received data for #{data.id}", data)
- lastEvents[data.id] = data
- if widgets[data.id]?.length > 0
- for widget in widgets[data.id]
- widget.receiveData(data)
+ if lastEvents[data.id]?.updatedAt != data.updatedAt
+ if Dashing.debugMode
+ console.log("Received data for #{data.id}", data)
+ lastEvents[data.id] = data
+ if widgets[data.id]?.length > 0
+ for widget in widgets[data.id]
+ widget.receiveData(data)
$(document).ready ->