From cc50b045f3df688cd7fc92dd13f602b5f46c1c9a Mon Sep 17 00:00:00 2001
From: jsalyers <jsalyers@syncad.com>
Date: Wed, 11 Nov 2020 15:30:00 -0500
Subject: [PATCH] [JES] Fix for comments disappearing. I had an invalid check
 when trying to determine if a comment was new or if it was an edit of an
 existing comment

---
 src/app/redux/GlobalReducer.js   | 6 ++++++
 src/app/redux/TransactionSaga.js | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/app/redux/GlobalReducer.js b/src/app/redux/GlobalReducer.js
index cf2756f84..eda56b32d 100644
--- a/src/app/redux/GlobalReducer.js
+++ b/src/app/redux/GlobalReducer.js
@@ -85,6 +85,12 @@ export default function reducer(state = defaultState, action = {}) {
                 body: payload.body,
                 title: payload.title,
                 category: payload.category,
+                stats: {
+                    hide: false,
+                    gray: false,
+                    total_votes: 0,
+                    flag_weight: 0,
+                },
             };
             return state.updateIn(['content', key], Map(), c =>
                 c.mergeDeep(update)
diff --git a/src/app/redux/TransactionSaga.js b/src/app/redux/TransactionSaga.js
index aabf89309..c725ba2bd 100644
--- a/src/app/redux/TransactionSaga.js
+++ b/src/app/redux/TransactionSaga.js
@@ -392,7 +392,10 @@ function* broadcastPayload({
 function* accepted_comment({ operation }) {
     const { author, permlink } = operation;
     //yield call(getContent, { author, permlink });
-    if (operation.title === '') {
+    if (
+        operation.__config.originalBody !== null &&
+        operation.__config.originalBody !== undefined
+    ) {
         yield call(lazyUpdate, operation);
     } else {
         yield call(wait, 9000);
-- 
GitLab