From 41fc9077e8bfc72dce19d6f6bdd7f312697d0dea Mon Sep 17 00:00:00 2001
From: Chris Lawton <chris.lawton@torchbox.com>
Date: Wed, 15 May 2019 16:31:43 +0100
Subject: [PATCH] clear editing state on note removal

---
 opentech/static_src/src/app/src/redux/reducers/notes.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/opentech/static_src/src/app/src/redux/reducers/notes.js b/opentech/static_src/src/app/src/redux/reducers/notes.js
index 389fb1783..669ec0439 100644
--- a/opentech/static_src/src/app/src/redux/reducers/notes.js
+++ b/opentech/static_src/src/app/src/redux/reducers/notes.js
@@ -143,6 +143,8 @@ function editingNote(state={}, action) {
                     message: action.message,
                 },
             };
+        case REMOVE_NOTE:
+            return {};
         default:
             return state;
     }
-- 
GitLab