Skip to content

Commit

Permalink
prevent false warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hacknlove committed Oct 21, 2022
1 parent 6f43c90 commit a658109
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/shared/lib/dynamic.tsx
Expand Up @@ -131,7 +131,7 @@ export default function dynamic<P = {}>(
)
}

if (loadableOptions.loading != null) {
if (loadableOptions.loading != null && loadableOptions.loading !== undefined) {
console.warn(
`"loading" is ignored by next/dynamic because you have enabled "suspense". Place your loading element in your suspense boundary's "fallback" prop instead. Read more: https://nextjs.org/docs/messages/invalid-dynamic-suspense`
)
Expand Down

0 comments on commit a658109

Please sign in to comment.