diff --git a/src/structs/types.ts b/src/structs/types.ts index 8bcc0ef3..7d69fd1a 100644 --- a/src/structs/types.ts +++ b/src/structs/types.ts @@ -366,6 +366,9 @@ export function record( isObject(value) || `Expected an object, but received: ${print(value)}` ) }, + coercer(value) { + return isObject(value) ? { ...value } : value + }, }) }