mirror of
https://github.com/strapi/strapi.git
synced 2025-09-18 13:02:18 +00:00
16 lines
284 B
JavaScript
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;
|