fix: toggle section only if preview is active

This commit is contained in:
ievgenii vdovenko 2025-12-24 12:52:03 +01:00
parent e09ea5e345
commit 1be5a7e2f9

View file

@ -484,14 +484,14 @@ var _submitAjaxPOST = function(url, postData, successHandler, failHandler) {
$(this.previewButton).on('click', function(e) {
e.preventDefault();
self.showUploadSection(false);
var text = self.cm.getValue();
if (text === "") {
return;
}
self.showUploadSection(false);
var postData = {
'text': text,
'renderer': templateContext.visual.default_renderer,