about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions/importer/normalizer.js
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-23 19:17:31 +0100
committerGitHub <noreply@github.com>2022-01-23 19:17:31 +0100
commite58e0eb9aa375b1107b207e8229a2142c4edc0b8 (patch)
tree9418aede73dbd682e937f900cd0eb1b637f2ea24 /app/javascript/flavours/glitch/actions/importer/normalizer.js
parentb209e919bddb4bb72bb4f8589f4b15654f22ef53 (diff)
parent9483d0c6b2b3eaffca8e02e8be4b9a21c5f9e767 (diff)
Merge pull request #1663 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/actions/importer/normalizer.js')
-rw-r--r--app/javascript/flavours/glitch/actions/importer/normalizer.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js
index 3995585f6..bda15a9b0 100644
--- a/app/javascript/flavours/glitch/actions/importer/normalizer.js
+++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js
@@ -54,9 +54,10 @@ export function normalizeStatus(status, normalOldStatus) {
     normalStatus.poll = status.poll.id;
   }
 
-  // Only calculate these values when status first encountered
-  // Otherwise keep the ones already in the reducer
-  if (normalOldStatus) {
+  // Only calculate these values when status first encountered and
+  // when the underlying values change. Otherwise keep the ones
+  // already in the reducer
+  if (normalOldStatus && normalOldStatus.get('content') === normalStatus.content && normalOldStatus.get('spoiler_text') === normalStatus.spoiler_text) {
     normalStatus.search_index = normalOldStatus.get('search_index');
     normalStatus.contentHtml = normalOldStatus.get('contentHtml');
     normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml');