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

This commit is contained in:
cuixiping
2020-01-14 10:57:24 +08:00
parent cb5f2b5b4f
commit b30036a424

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) {