Skip to content

Commit f2d6c29

Browse files
committed
feat: fixed issue with clip-paths breaking when deleting all of the vertices
1 parent 9e46af9 commit f2d6c29

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

components/core/CreateShape.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,13 @@ const CreateShape = (props) => {
234234

235235
// Returns a generated formula string from a verticeCoordinate array
236236
function generateNewFormula(newVerticeCoordinates) {
237+
237238
let newFormula = shapeInformation.clipPathType + "(";
238239

240+
if (newVerticeCoordinates.length === 0) {
241+
return newFormula + ")";
242+
}
243+
239244
for (let i = 0; i < newVerticeCoordinates.length; i++) {
240245
let newX = newVerticeCoordinates[i].x;
241246
let newY = newVerticeCoordinates[i].y;

0 commit comments

Comments
 (0)