Skip to content

Commit

Permalink
Do not add slice_name when slice doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
vera-liu committed Feb 25, 2017
1 parent cad392e commit 36929a6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions superset/assets/javascripts/explorev2/components/SaveModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,15 @@ class SaveModal extends React.Component {
/>
</Alert>
}
<Radio
disabled={!this.props.can_overwrite}
checked={this.state.action === 'overwrite'}
onChange={this.changeAction.bind(this, 'overwrite')}
>
{`Overwrite slice ${this.props.slice.slice_name}`}
</Radio>
{this.props.slice &&
<Radio
disabled={!this.props.can_overwrite}
checked={this.state.action === 'overwrite'}
onChange={this.changeAction.bind(this, 'overwrite')}
>
{`Overwrite slice ${this.props.slice.slice_name}`}
</Radio>
}

<Radio
inline
Expand Down

0 comments on commit 36929a6

Please sign in to comment.