OSDN Git Service

fixed duplicate on wall
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>
Sun, 6 Nov 2011 21:32:37 +0000 (23:32 +0200)
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>
Sun, 6 Nov 2011 21:32:37 +0000 (23:32 +0200)
app/assets/javascripts/note.js

index 7acc81e..ef5330b 100644 (file)
@@ -42,8 +42,10 @@ replace:
 
 prepend:
   function(id, html) {
-    this.last_id = id;
-    $("#notes-list").prepend(html);
+    if(id != this.last_id) { 
+      this.last_id = id;
+      $("#notes-list").prepend(html);
+    }
   },
 
 getNew: