Fix JSON parse issue when syncing recipe data

This commit is contained in:
Sam Becker 2025-03-21 19:09:21 -05:00
parent 4aa3739c9a
commit f3dfb8ddf8

View File

@ -108,8 +108,8 @@ export default function PhotoForm({
let a = currentForm[key];
let b = value;
if (FIELDS_WITH_JSON.includes(key)) {
a = JSON.parse(a ?? '');
b = JSON.parse(b ?? '');
a = a ? JSON.parse(a) : undefined;
b = b ? JSON.parse(b) : undefined;
}
if (!deepEqual(a, b)) {
changedKeys.push(key as keyof PhotoFormData);