Explorar o código

Prevent Draftail rerender when editing comments

jacobtoppm %!s(int64=3) %!d(string=hai) anos
pai
achega
9b1156210c

+ 5 - 2
client/src/components/Draftail/CommentableEditor/CommentableEditor.tsx

@@ -579,8 +579,11 @@ function CommentableEditor({
 
     if (
       !validFocusChange &&
-      previousIds === ids &&
-      previousEnabled === enabled
+      previousEnabled === enabled &&
+      (
+        previousIds === ids ||
+        (previousIds.length === ids.length && previousIds.every((value, index) => value === ids[index]))
+      )
     ) {
       return;
     }