Fix: Pressing 'Ctrl+A' causes js error when canvas is empty
This commit is contained in:
@@ -687,6 +687,9 @@ const addToSelection = this.addToSelection = function (elemsToAdd, showGrips) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!selectedElements.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
call('selected', selectedElements);
|
call('selected', selectedElements);
|
||||||
|
|
||||||
if (showGrips || selectedElements.length === 1) {
|
if (showGrips || selectedElements.length === 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user