mirror of
https://github.com/maputnik/editor.git
synced 2025-12-24 15:10:01 +00:00
Added guard to getSources
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user