Fix JSON parse issue when syncing recipe data
This commit is contained in:
parent
4aa3739c9a
commit
f3dfb8ddf8
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user