soupette a147590cad Add conditions to reducer
Signed-off-by: soupette <cyril.lpz@gmail.com>
2021-02-12 09:52:06 +01:00

16 lines
284 B
JavaScript

const removeConditionKeyFromData = obj => {
if (!obj) {
return null;
}
return Object.keys(obj).reduce((acc, current) => {
if (current !== 'conditions') {
acc[current] = obj[current];
}
return acc;
}, {});
};
export default removeConditionKeyFromData;