Przeglądaj źródła

fix state initial value

ryohi15 5 lat temu
rodzic
commit
3e2cfeee25

+ 2 - 2
src/client/js/components/StaffCredit/StaffCredit.jsx

@@ -26,7 +26,7 @@ class StaffCredit extends React.Component {
     super(props);
     super(props);
     this.state = {
     this.state = {
       isShown: true,
       isShown: true,
-      gcContributors: {},
+      gcContributors: null,
     };
     };
     this.deleteCredit = this.deleteCredit.bind(this);
     this.deleteCredit = this.deleteCredit.bind(this);
   }
   }
@@ -60,7 +60,7 @@ class StaffCredit extends React.Component {
 
 
   renderContributors() {
   renderContributors() {
     if (this.state.isShown) {
     if (this.state.isShown) {
-      if (this.state.gcContributors !== {}) {
+      if (this.state.gcContributors != null) {
         // TODO: merge gcContributors to Contributors
         // TODO: merge gcContributors to Contributors
         // refs: https://youtrack.weseek.co.jp/issue/GW-4573
         // refs: https://youtrack.weseek.co.jp/issue/GW-4573
       }
       }