From b6d01ccdca11830a46bd771d27ff01985ca2e727 Mon Sep 17 00:00:00 2001
From: L0veSunshine <xuan199651@gmail.com>
Date: Thu, 21 May 2020 03:41:33 +0800
Subject: [PATCH] Fix the bug that the emoji does not disappear (#11489)

* Fix the bug that the emoticon does not disappear

* Update web_src/js/index.js

Co-authored-by: Lauris BH <lauris@nix.lv>

* Update web_src/js/index.js

Co-authored-by: Lauris BH <lauris@nix.lv>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
---
 web_src/js/index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web_src/js/index.js b/web_src/js/index.js
index af1c4acd46..a1b92f38a9 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -239,7 +239,7 @@ function initReactionSelector(parent) {
       if (resp && (resp.html || resp.empty)) {
         const content = $(vm).closest('.content');
         let react = content.find('.segment.reactions');
-        if (!resp.empty && react.length > 0) {
+        if ((!resp.empty || resp.html === '') && react.length > 0) {
           react.remove();
         }
         if (!resp.empty) {