Skip to content

Commit d5b20c8

Browse files
prevent crash
1 parent 0d9c956 commit d5b20c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/editor/actions/editor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function getCloneProps (entityId: number, component: string, state: AppState) {
7777
patternId: newPatternId,
7878
shapeId: newShapeId,
7979
shapePoints: pattern.shapePoints.map(sp => ({...sp, shapeId: newShapeId})),
80-
patternStopAreas: pattern.stopAreas.map(area => ({...area, patternId: newPatternId})),
80+
patternStopAreas: pattern.stopAreas && pattern.stopAreas.map(area => ({...area, patternId: newPatternId})),
8181
patternLocations: pattern.patternLocations.map(pl => ({...pl, patternId: newPatternId})),
8282
patternStops: pattern.patternStops.map(ps => ({...ps, patternId: newPatternId}))
8383
}

0 commit comments

Comments
 (0)