From dbdb211640e6f8d1809df067d3df14a0a86a23ec Mon Sep 17 00:00:00 2001 From: sagar-joshi Date: Fri, 5 Mar 2021 00:39:20 +0530 Subject: [PATCH] access item.project only if item.isDeleted is false --- client/modules/IDE/components/AddToCollectionSketchList.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/components/AddToCollectionSketchList.jsx b/client/modules/IDE/components/AddToCollectionSketchList.jsx index 175abde107..e42aff8d60 100644 --- a/client/modules/IDE/components/AddToCollectionSketchList.jsx +++ b/client/modules/IDE/components/AddToCollectionSketchList.jsx @@ -52,8 +52,9 @@ class SketchList extends React.Component { }; inCollection = (sketch) => - this.props.collection.items.find((item) => item.project.id === sketch.id) != - null; + this.props.collection.items.find((item) => + item.isDeleted ? false : item.project.id === sketch.id + ) != null; render() { const hasSketches = this.props.sketches.length > 0;