From ed39618da255caae9c873fc1966d32df622ed49f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 27 May 2020 09:05:46 -0400 Subject: [PATCH] [frio] Move variable assignment where it belongs in asynchronous comment form submission callback --- view/theme/frio/js/theme.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 3a3f02c5e..ce3294141 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -362,6 +362,7 @@ $(document).ready(function(){ // Comment form submit $body.on('submit', '.comment-edit-form', function(e) { + let $form = $(this); let id = $form.data('item-id'); // Compose page form exception: id is always 0 and form must not be submitted asynchronously @@ -371,8 +372,6 @@ $(document).ready(function(){ e.preventDefault(); - let $form = $(this); - let $commentSubmit = $form.find('.comment-edit-submit').button('loading'); unpause();