From b8891c275aeb12d2a62b1f6c98cd52ff240e89d9 Mon Sep 17 00:00:00 2001
From: DD <liudi08@gmail.com>
Date: Wed, 7 Mar 2018 11:03:55 -0500
Subject: [PATCH] fix lint

---
 src/containers/costume-tab.jsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/containers/costume-tab.jsx b/src/containers/costume-tab.jsx
index cdf2cf3ac..3ce07dd02 100644
--- a/src/containers/costume-tab.jsx
+++ b/src/containers/costume-tab.jsx
@@ -96,10 +96,7 @@ class CostumeTab extends React.Component {
             return;
         }
 
-        // If switching editing targets, update the costume index
-        if (this.props.editingTarget !== editingTarget) {
-            this.setState({selectedCostumeIndex: target.currentCostume});
-        } else {
+        if (this.props.editingTarget === editingTarget) {
             // Switch to a newly added costume if there is one
             const oldTarget = this.props.sprites[editingTarget] ?
                 this.props.sprites[editingTarget] : this.props.stage;
@@ -109,6 +106,9 @@ class CostumeTab extends React.Component {
             if (oldTarget.costumeCount < target.costumeCount) {
                 this.setState({selectedCostumeIndex: target.currentCostume});
             }
+        } else {
+            // If switching editing targets, update the costume index
+            this.setState({selectedCostumeIndex: target.currentCostume});
         }
 
         // In case of deleted costumes
-- 
GitLab