Do not add slice_name when slice doesn't exist (#2265)

This commit is contained in:
vera-liu 2017-02-24 17:20:35 -08:00 committed by Alanna Scott
parent 3a758900eb
commit 4d900c9ee1

View File

@ -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