Skip to content

Commit 0a1cf7b

Browse files
authored
perf: do not send minRows and maxRows undefined values to client (#10600)
This reduces the size of the initial HTML
1 parent 22f3c79 commit 0a1cf7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/payload/src/fields/config/sanitize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ export const sanitizeFields = async ({
120120
console.warn(
121121
`(payload): The "min" property is deprecated for the Relationship field "${field.name}" and will be removed in a future version. Please use "minRows" instead.`,
122122
)
123+
field.minRows = field.min
123124
}
124125
if (field.max && !field.maxRows) {
125126
console.warn(
126127
`(payload): The "max" property is deprecated for the Relationship field "${field.name}" and will be removed in a future version. Please use "maxRows" instead.`,
127128
)
129+
field.maxRows = field.max
128130
}
129-
field.minRows = field.minRows || field.min
130-
field.maxRows = field.maxRows || field.max
131131
}
132132

133133
if (field.type === 'upload') {

0 commit comments

Comments
 (0)