Skip to content

Commit 9fe5b5f

Browse files
committed
fix(config-editor): coerce deleted keys to null in local computePatches
Aligns with canonical config-utils.ts:66 — keys absent from modObj or explicitly set to undefined now emit null in the patch value instead of undefined, preventing stale/invalid patch payloads on key deletion.
1 parent 8dc0da6 commit 9fe5b5f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

web/src/components/dashboard/config-editor.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,8 @@ function computePatches(
18091809
) {
18101810
walk(origVal as Record<string, unknown>, modVal as Record<string, unknown>, fullPath);
18111811
} else {
1812-
patches.push({ path: fullPath, value: modVal });
1812+
const patchValue = !Object.hasOwn(modObj, key) || modVal === undefined ? null : modVal;
1813+
patches.push({ path: fullPath, value: patchValue });
18131814
}
18141815
}
18151816
}

0 commit comments

Comments
 (0)