mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	Fix JS error with disabled attachment and easymde (#31511)
Not sure if this is a regression from https://github.com/go-gitea/gitea/pull/30513, but when attachments are disabled, `this.dropzone` is null and the code had failed in `initEasyMDEPaste` trying to access `dropzoneEl.dropzone`.
This commit is contained in:
		| @@ -264,7 +264,9 @@ class ComboMarkdownEditor { | ||||
|     }); | ||||
|     this.applyEditorHeights(this.container.querySelector('.CodeMirror-scroll'), this.options.editorHeights); | ||||
|     await attachTribute(this.easyMDE.codemirror.getInputField(), {mentions: true, emoji: true}); | ||||
|     if (this.dropzone) { | ||||
|       initEasyMDEPaste(this.easyMDE, this.dropzone); | ||||
|     } | ||||
|     hideElem(this.textareaMarkdownToolbar); | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user