From e0ae33d4fbfd85da9fa806ec69fc0ad1d5fe45f0 Mon Sep 17 00:00:00 2001
From: Alexandru Munteanu <alexandru.munt@gmail.com>
Date: Fri, 26 Oct 2018 09:19:16 +0300
Subject: [PATCH] fix(submitRevision): submit revision hotfix

---
 .../component-manuscript/src/submitRevision/utils.js | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/packages/component-manuscript/src/submitRevision/utils.js b/packages/component-manuscript/src/submitRevision/utils.js
index ce3fdc47c..bee60515f 100644
--- a/packages/component-manuscript/src/submitRevision/utils.js
+++ b/packages/component-manuscript/src/submitRevision/utils.js
@@ -1,5 +1,5 @@
 import { actions } from 'pubsweet-client'
-import { get, debounce, omit, set, isEqual } from 'lodash'
+import { get, debounce, omit, set } from 'lodash'
 import { handleError } from 'pubsweet-component-faraday-ui'
 import { autosaveRequest } from 'pubsweet-component-wizard/src/redux/autosave'
 import { submitRevision } from 'pubsweet-component-wizard/src/redux/conversion'
@@ -14,12 +14,10 @@ const parseRevision = (values, fragment) => ({
 const _onChange = (values, dispatch, { collection, fragment }) => {
   const newValues = omit(values, 'editAuthors')
 
-  if (!isEqual(newValues, fragment.revision)) {
-    dispatch(autosaveRequest())
-    dispatch(
-      actions.updateFragment(collection, parseRevision(values, fragment)),
-    )
-  }
+  dispatch(autosaveRequest())
+  dispatch(
+    actions.updateFragment(collection, parseRevision(newValues, fragment)),
+  )
 }
 
 export const onChange = debounce(_onChange, 1000, { maxWait: 5000 })
-- 
GitLab