Merge pull request #221 from orangemug/fix/added-guard-to-get-sources

Added guard to getSources
This commit is contained in:
Orange Mug 2018-01-21 19:08:10 +00:00 committed by GitHub
commit 4b0768d0a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,7 @@ class AddModal extends React.Component {
}
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);
}
}