From 2e79a8ff4ce5e7af2c5dfddaa6bbdf016225569d Mon Sep 17 00:00:00 2001 From: orangemug Date: Sat, 20 Jan 2018 09:39:18 +0000 Subject: [PATCH] Added guard to getSources --- src/components/modals/AddModal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modals/AddModal.jsx b/src/components/modals/AddModal.jsx index a32eb6b..910b085 100644 --- a/src/components/modals/AddModal.jsx +++ b/src/components/modals/AddModal.jsx @@ -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); } }