]> git.mxchange.org Git - friendica.git/commitdiff
[frio] Move variable assignment where it belongs in asynchronous comment form submiss...
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 27 May 2020 13:05:46 +0000 (09:05 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 27 May 2020 13:05:46 +0000 (09:05 -0400)
view/theme/frio/js/theme.js

index 3a3f02c5e5f239ac379592bbff86be1de5953d5e..ce3294141995fe3f63d38af7c6947917ddcc71b8 100644 (file)
@@ -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();