Skip to content

Commit 3a76293

Browse files
committed
Change historyOfTypeIsValid condition
1 parent 5054580 commit 3a76293

File tree

1 file changed

+2
-1
lines changed
  • src/components/Widgets/Markdown/MarkdownControl/VisualEditor

1 file changed

+2
-1
lines changed

src/components/Widgets/Markdown/MarkdownControl/VisualEditor/keys.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ function changeHistory(change, type) {
2121
*/
2222
const next = historyOfType.first();
2323
const historyOfTypeIsValid = historyOfType.size > 1
24-
|| ( next && next.length > 1 && next[0].type !== 'set_selection' );
24+
|| (next && next.length > 1)
25+
|| (next && next[0] && next[0].type !== 'set_selection');
2526

2627
if (historyOfTypeIsValid) {
2728
change[type]();

0 commit comments

Comments
 (0)