Fix: Pressing 'Ctrl+A' causes js error when canvas is empty

master
cuixiping 2020-01-14 10:57:24 +08:00
parent cb5f2b5b4f
commit b30036a424
1 changed files with 3 additions and 0 deletions

View File

@ -687,6 +687,9 @@ const addToSelection = this.addToSelection = function (elemsToAdd, showGrips) {
}
}
}
if (!selectedElements.length) {
return;
}
call('selected', selectedElements);
if (showGrips || selectedElements.length === 1) {