Skip to content

Commit dbdb211

Browse files
committed
access item.project only if item.isDeleted is false
1 parent 502033c commit dbdb211

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)