We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3f0236 commit 808f18cCopy full SHA for 808f18c
packages/next-server/lib/dynamic.tsx
@@ -109,8 +109,8 @@ export default function dynamic<P = {}>(
109
const loadModules: LoaderMap = {}
110
const modules = dynamicOptions.modules()
111
Object.keys(modules).forEach((key) => {
112
- const value = modules[key]
113
- if (value instanceof Promise) {
+ const value: any = modules[key]
+ if (typeof value.then === 'function') {
114
loadModules[key] = () => value.then((mod: any) => mod.default || mod)
115
return
116
}
0 commit comments