From 97811b999181ecb1ce8e0e7a17ba386bdda46d19 Mon Sep 17 00:00:00 2001
From: DD <liudi08@gmail.com>
Date: Thu, 12 Oct 2017 17:31:17 -0400
Subject: [PATCH] fix lint

---
 src/containers/costume-tab.jsx | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/containers/costume-tab.jsx b/src/containers/costume-tab.jsx
index 65aced936..843380f29 100644
--- a/src/containers/costume-tab.jsx
+++ b/src/containers/costume-tab.jsx
@@ -84,6 +84,7 @@ class CostumeTab extends React.Component {
 
         const addMessage = target.isStage ? addBackdropMsg : addCostumeMsg;
         const addFunc = target.isStage ? onNewBackdropClick : onNewCostumeClick;
+        const costume = this.props.vm.editingTarget.sprite.costumes[this.state.selectedCostumeIndex];
 
         return (
             <AssetPanel
@@ -97,15 +98,15 @@ class CostumeTab extends React.Component {
                 onDeleteClick={this.handleDeleteCostume}
                 onItemClick={this.handleSelectCostume}
             >
-            {target.costumes ?
-                <PaintEditor
-                    svg={this.props.vm.getCostumeSvg(this.state.selectedCostumeIndex)}
-                    rotationCenterX={this.props.vm.editingTarget.sprite.costumes[this.state.selectedCostumeIndex].rotationCenterX}
-                    rotationCenterY={this.props.vm.editingTarget.sprite.costumes[this.state.selectedCostumeIndex].rotationCenterY}
-                    onUpdateSvg={this.handleUpdateSvg}
-                />
-                : null
-            }
+                {target.costumes ?
+                    <PaintEditor
+                        rotationCenterX={costume.rotationCenterX}
+                        rotationCenterY={costume.rotationCenterY}
+                        svg={this.props.vm.getCostumeSvg(this.state.selectedCostumeIndex)}
+                        onUpdateSvg={this.handleUpdateSvg}
+                    /> :
+                    null
+                }
             </AssetPanel>
         );
     }
-- 
GitLab