Skip to content

Commit 7a21b44

Browse files
authored
fix: vercel upload adapter warning false positive (#10434)
Adjust logic for warning message.
1 parent b092754 commit 7a21b44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/payload/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,10 @@ export class BasePayload {
659659
(c) => c.upload && c.upload.adapter === undefined, // Uploads enabled, but no storage adapter provided
660660
)
661661

662-
if (uploadCollWithoutAdapter) {
662+
if (uploadCollWithoutAdapter.length) {
663663
const slugs = uploadCollWithoutAdapter.map((c) => c.slug).join(', ')
664664
this.logger.warn(
665-
`Collections with uploads enabled require a storage adapter when deploying to Vercel. Collections without storage adapters: ${slugs}. See https://payloadcms.com/docs/upload/storage-adapters for more info.`,
665+
`Collections with uploads enabled require a storage adapter when deploying to Vercel. Collection(s) without storage adapters: ${slugs}. See https://payloadcms.com/docs/upload/storage-adapters for more info.`,
666666
)
667667
}
668668
}

0 commit comments

Comments
 (0)