Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #479 from metasfresh/dev-473
Browse files Browse the repository at this point in the history
#473 Quick fix for selection of undefined
  • Loading branch information
damianprzygodzki authored Mar 3, 2017
2 parents c33b622 + 8877292 commit ce6aa77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/app/DocumentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ class DocumentList extends Component {
});
}

isSelectionExist(selected) {
doesSelectionExist(selected) {
const {data} = this.state;
// When the rows are changing we should ensure
// that selection still exist
return (data && data.size && data.result && selected[0] &&
return (data && data.size && data.result && selected && selected[0] &&
getItemsByProperty(
data.result, 'id', selected[0]
).length
Expand Down Expand Up @@ -321,7 +321,7 @@ class DocumentList extends Component {
fetchQuickActionsOnInit, isModal
} = this.props;

const selectionValid = this.isSelectionExist(selected);
const selectionValid = this.doesSelectionExist(selected);

if(layout && data) {
return (
Expand Down

0 comments on commit ce6aa77

Please sign in to comment.