dont use lodash get()

This commit is contained in:
bkmartinjr
2018-05-02 16:52:08 -07:00
parent b3ee24d7c7
commit 1bca48cde3

View File

@@ -70,8 +70,10 @@ const Controls = (state = {
// Add each cell to its categorical metadata set.
_.forEach(cell, (_value, key) => {
const s = _.get(categoricalAsCellsMap, [key, _value]);
if (s) s.push(cell);
if (categoricalAsCellsMap[key] && categoricalAsCellsMap[key][_value]) {
const s = categoricalAsCellsMap[key][_value];
if (s) s.push(cell);
}
});
});