From e9bf50da888a3639b6eb7f150e32d1ea4b0e8c91 Mon Sep 17 00:00:00 2001 From: Chris Lawton <chris.lawton@torchbox.com> Date: Fri, 10 May 2019 12:37:00 +0100 Subject: [PATCH] use attr to get data attribute so they aren't cached --- opentech/static_src/src/javascript/apply/edit-comment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentech/static_src/src/javascript/apply/edit-comment.js b/opentech/static_src/src/javascript/apply/edit-comment.js index 509bd2361..54012df29 100644 --- a/opentech/static_src/src/javascript/apply/edit-comment.js +++ b/opentech/static_src/src/javascript/apply/edit-comment.js @@ -20,7 +20,7 @@ const editBlockWrapper = $(this).closest(feedContent).find(editBlock); const commentWrapper = $(this).closest(feedContent).find(comment); - const commentContents = $(commentWrapper).data('comment'); + const commentContents = $(commentWrapper).attr('data-comment'); // hide the edit link and original comment $(this).parent().hide(); @@ -55,7 +55,7 @@ // handle submit $(document).on('click', submitEditButton, function () { const commentContainer = $(this).closest(editBlock).siblings(comment); - const id = $(commentContainer).data('id'); + const id = $(commentContainer).attr('data-id'); const editedComment = $(this).closest(pageDown).find('.wmd-preview').html(); // TODO - get correct URL -- GitLab