Skip to content

Commit 76c86c9

Browse files
committed
feat: fixed issue where deleting entire clip-path crashes app
1 parent 4491c94 commit 76c86c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/core/CreateShape.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const CreateShape = (props) => {
7373

7474
});
7575
} else if (name === "formula") {
76-
const edgeVerticeNumber = shapeInformation.clipPathType === "polygon" ? value.split(",").length: 0;
76+
const edgeVerticeNumber = shapeInformation.clipPathType === "polygon" && value !== "" ? value.split(",").length: 0;
7777

7878
// If user deletes all, set formula to the Clip-Path type with an empty set of parentheses
7979
if (value === "") {

0 commit comments

Comments
 (0)