|
|
@@ -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
|
|
|
});
|