diff --git a/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/keys.js b/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/keys.js index a13f0552..39aabae3 100644 --- a/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/keys.js +++ b/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/keys.js @@ -22,9 +22,9 @@ function changeHistory(change, type) { const next = historyOfType.first(); const historyOfTypeIsValid = historyOfType.size > 1 || (next && next.length > 1) - || (next && next[0] && next[0].type !== 'set_selection'); + || (next && next[0] && next[0].type !== 'set_selection'; - if (historyOfTypeIsValid) { + if (next && historyOfTypeIsValid) { change[type](); }