Skip to content

Commit 62b3738

Browse files
authored
Fix JS error with disabled attachment and easymde (#31511)
Not sure if this is a regression from #30513, but when attachments are disabled, `this.dropzone` is null and the code had failed in `initEasyMDEPaste` trying to access `dropzoneEl.dropzone`.
1 parent d655ff1 commit 62b3738

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_src/js/features/comp/ComboMarkdownEditor.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ class ComboMarkdownEditor {
264264
});
265265
this.applyEditorHeights(this.container.querySelector('.CodeMirror-scroll'), this.options.editorHeights);
266266
await attachTribute(this.easyMDE.codemirror.getInputField(), {mentions: true, emoji: true});
267-
initEasyMDEPaste(this.easyMDE, this.dropzone);
267+
if (this.dropzone) {
268+
initEasyMDEPaste(this.easyMDE, this.dropzone);
269+
}
268270
hideElem(this.textareaMarkdownToolbar);
269271
}
270272

0 commit comments

Comments
 (0)