Skip to content

Commit 36175d3

Browse files
authored
Merge pull request #1787 from sagar-joshi/bug-editor-crashes-on-adding-sketch-to-a-collection
access item.project only if item.isDeleted is false
2 parents be98ad0 + 196fc20 commit 36175d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client/modules/IDE/components/AddToCollectionSketchList.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ class SketchList extends React.Component {
5252
};
5353

5454
inCollection = (sketch) =>
55-
this.props.collection.items.find((item) => item.project.id === sketch.id) !=
56-
null;
55+
this.props.collection.items.find((item) =>
56+
item.isDeleted ? false : item.project.id === sketch.id
57+
) != null;
5758

5859
render() {
5960
const hasSketches = this.props.sketches.length > 0;

0 commit comments

Comments
 (0)