Check next in condition
This commit is contained in:
parent
fba6929301
commit
99ee5e2f9a
@ -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]();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user