Fix issue where loading a project while in costume tab yields oops page.

This commit is contained in:
Karishma Chadha committed 2018-04-17 09:17:06 -04:00
1 parent 59dc2b0cbc
commit ffdf121a0e
1 file changed
+2 -1
+2 -1
View File
@@ -224,7 +224,8 @@ class CostumeTab extends React.Component {
]}
items={costumeData}
selectedItemIndex={this.state.selectedCostumeIndex}
onDeleteClick={target.costumes.length > 1 ? this.handleDeleteCostume : null}
onDeleteClick={target && target.costumes && target.costumes.length > 1 ?
this.handleDeleteCostume : null}
onDuplicateClick={this.handleDuplicateCostume}
onItemClick={this.handleSelectCostume}
>