From 1e34674fdfa86594e34e08a08b71d840dad6d434 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 3 Apr 2013 02:44:49 +0200 Subject: [PATCH] Prevent a post from being killed twice, f.e. when the thread updater udpdates the post before we get an answer from the server. --- src/main.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.coffee b/src/main.coffee index 6ca73d301..16966fe8f 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -158,10 +158,12 @@ class Post kill: (file, now) -> now or= new Date() if file + return if @file.isDead @file.isDead = true @file.timeOfDeath = now $.addClass @nodes.root, 'deleted-file' else + return if @isDead @isDead = true @timeOfDeath = now $.addClass @nodes.root, 'deleted-post'