]> git.mxchange.org Git - friendica.git/commitdiff
change response-handling (code-review)
authorJakobus Schürz <jakobus.schuerz@schuerz.at>
Fri, 17 Mar 2023 16:05:18 +0000 (17:05 +0100)
committerJakobus Schürz <jakobus.schuerz@schuerz.at>
Sun, 19 Mar 2023 17:52:46 +0000 (18:52 +0100)
view/js/dropzone-factory.js

index 1b2a2933744ff67ae93a13a4afb10a813d339bc0..c2246dfa20d7ddd9ede24dc25e063934dc699032 100644 (file)
@@ -13,13 +13,12 @@ var DzFactory = function () {
                        init: function() {
                                this.on('success', function(file, serverResponse) {
                                        const targetTextarea = document.getElementById(textareaElementId);
-                                       const bbcodeString = serverResponse;
                                        if (targetTextarea.setRangeText) {
                                                //if setRangeText function is supported by current browser
-                                               targetTextarea.setRangeText(' ' + $.trim(bbcodeString) + ' ');
+                                               targetTextarea.setRangeText(' ' + $.trim(serverResponse) + ' ');
                                        } else {
                                                targetTextarea.focus();
-                                               document.execCommand('insertText', false /*no UI*/, '\n' + $.trim(bbcodeString) + '\n');
+                                               document.execCommand('insertText', false /*no UI*/, '\n' + $.trim(serverResponse) + '\n');
                                        }
                                });
                                this.on('complete', function(file) {