mirror of
https://github.com/maputnik/editor.git
synced 2026-01-04 12:30:00 +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)) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user