From c622d523965c84799a0bfcedf83f1c0a10c4ac2c Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 9 Oct 2018 10:15:08 -0400 Subject: [PATCH] Pass the topLevelCommentId to make sure nested comment deleting works --- src/redux/preview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redux/preview.js b/src/redux/preview.js index a151fe41c..318f578d1 100644 --- a/src/redux/preview.js +++ b/src/redux/preview.js @@ -611,7 +611,7 @@ module.exports.updateProject = (id, jsonData, username, token) => (dispatch => { }); }); -module.exports.deleteComment = (projectId, commentId, token) => (dispatch => { +module.exports.deleteComment = (projectId, commentId, topLevelCommentId, token) => (dispatch => { /* TODO fetching/fetched/error states updates for comment deleting */ api({ uri: `/proxy/comments/project/${projectId}`, @@ -627,7 +627,7 @@ module.exports.deleteComment = (projectId, commentId, token) => (dispatch => { log.error(err || res.body); return; } - dispatch(module.exports.setCommentDeleted(commentId)); + dispatch(module.exports.setCommentDeleted(commentId, topLevelCommentId)); }); });