refactor: custom fields casing

This commit is contained in:
Carlos Valente
2024-04-27 09:22:54 +02:00
committed by Carlos Valente
parent 95b437e18c
commit 0c3c08ac98
3 changed files with 5 additions and 3 deletions
@@ -46,7 +46,8 @@ const actionHandlers: Record<string, ActionHandler> = {
if (typeof property !== 'string' || value === undefined) {
throw new Error('Invalid property or value');
}
const newObjectProperty = parseProperty(property, value);
// all custom fields keys are lowercase
const newObjectProperty = parseProperty(property.toLowerCase(), value);
if (patchEvent.custom && newObjectProperty.custom) {
Object.assign(patchEvent.custom, newObjectProperty.custom);