diff --git a/app/assets/javascripts/discourse/lib/Markdown.Editor.js b/app/assets/javascripts/discourse/lib/Markdown.Editor.js index ac8e2ad929d..148ae87c91b 100644 --- a/app/assets/javascripts/discourse/lib/Markdown.Editor.js +++ b/app/assets/javascripts/discourse/lib/Markdown.Editor.js @@ -1420,7 +1420,7 @@ inputBox.focus(); - if (button.textOp) { + if (button && button.textOp) { if (undoManager) { undoManager.setCommandMode();