Skip to content

Commit

Permalink
Change historyOfTypeIsValid condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Dammmien committed Dec 7, 2017
1 parent 5054580 commit 3a76293
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function changeHistory(change, type) {
*/
const next = historyOfType.first();
const historyOfTypeIsValid = historyOfType.size > 1
|| ( next && next.length > 1 && next[0].type !== 'set_selection' );
|| (next && next.length > 1)
|| (next && next[0] && next[0].type !== 'set_selection');

if (historyOfTypeIsValid) {
change[type]();
Expand Down

0 comments on commit 3a76293

Please sign in to comment.