Preserve opaque JSON keys independently of field write guards
Foundry Go checks / check (push) Successful in 2m51s
Foundry Go checks / check (pull_request) Successful in 2m45s

This commit is contained in:
2026-11-07 22:52:31 +08:00
parent 4a89137e38
commit bf8763e0de
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -95,8 +95,8 @@ func modelJSONSafe(value any, depth int) bool {
}
return true
case map[string]any:
for key, item := range value {
if canvasChoice(key, "__proto__", "constructor", "prototype") || !modelJSONSafe(item, depth+1) {
for _, item := range value {
if !modelJSONSafe(item, depth+1) {
return false
}
}