Added guard to getSources

This commit is contained in:
orangemug 2018-01-20 09:39:18 +00:00
parent 664125d820
commit 2e79a8ff4c

View file

@ -102,7 +102,7 @@ class AddModal extends React.Component {
} }
for(let [key, val] of Object.entries(this.props.sources)) { for(let [key, val] of Object.entries(this.props.sources)) {
if(types[val.type].indexOf(type) > -1) { if(types[val.type] && types[val.type].indexOf(type) > -1) {
sources.push(key); sources.push(key);
} }
} }