Permalink
Browse files

fix demo jerkiness

  • Loading branch information...
1 parent 2c08622 commit 3ea8dd22db0056e32c488ccf829e8ad9b7105095 Jonas Huckestein committed Feb 6, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 test/server.coffee
View
@@ -28,8 +28,9 @@ sync = ObjectSync.listen server,
update: (obj, sid, callback) ->
if objects[obj.id]
same = true
- same = same and (objects[obj.id][prop] is val) for prop, val of obj
- objects[obj.id] = obj
+ for prop, val of obj when objects[obj.id][prop] isnt val
+ same = false
+ objects[obj.id][prop] = val
callback null, obj, not same
else callback
code: 'invalid_id'

0 comments on commit 3ea8dd2

Please sign in to comment.