Skip to content

Commit

Permalink
add if enableAddSlice is truthy (#1015)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alanna Scott committed Aug 25, 2016
1 parent d1f43e3 commit e85978a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ class SliceAdder extends React.Component {
render() {
const hideLoad = this.slicesLoaded || this.errored;
let enableAddSlice = this.state.selectionMap && Object.keys(this.state.selectionMap);
enableAddSlice = enableAddSlice.some(function (key) {
return this.state.selectionMap[key];
}, this);
if (enableAddSlice) {
enableAddSlice = enableAddSlice.some(function (key) {
return this.state.selectionMap[key];
}, this);
}
const modalContent = (
<div>
<img
Expand Down

0 comments on commit e85978a

Please sign in to comment.