xy hace 7 años
padre
commit
32df085795
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/components/common/schema/Schema.jsx

+ 2 - 2
src/components/common/schema/Schema.jsx

@@ -11,7 +11,7 @@ class Schema extends Component {
     constructor(props) {
         super(props);
         this.state = {
-            currentTable: props.location.state.create ? 'add' : '',
+            currentTable: props.location.state === undefined? '' : props.location.state.create ? 'add' : '',
             // default schemaID and schemaName
             schemaID: props.schemaID || props.location.state.schemaID,
             schemaName: props.schemaName || props.location.state.schemaName,
@@ -37,7 +37,7 @@ class Schema extends Component {
 
     componentWillReceiveProps(next) {
         this.setState({
-            currentTable: next.location.state.create ? 'add' : '',
+            currentTable: next.location.state === undefined? '' : next.location.state.create ? 'add' : '',
             schemaID: next.schemaID,
             schemaName: next.schemaName
         });