mirror of
https://github.com/maputnik/editor.git
synced 2026-12-05 16:24:20 +00:00
Added guard to getSources
This commit is contained in:
1 parent
664125d820
commit
2e79a8ff4c
1 file changed
+1
-1
@@ -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