Skip to content

Commit 2876ed8

Browse files
committed
fix: resolve async component default for native dynamic import
fix #6751
1 parent 35e55ec commit 2876ed8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/core/vdom/helpers/resolve-async-component.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ import {
66
isDef,
77
isUndef,
88
isTrue,
9-
isObject
9+
isObject,
10+
hasSymbol
1011
} from 'core/util/index'
1112

1213
import { createEmptyVNode } from 'core/vdom/vnode'
1314

14-
function ensureCtor (comp, base) {
15-
if (comp.__esModule && comp.default) {
15+
function ensureCtor (comp: any, base) {
16+
if (
17+
comp.__esModule ||
18+
(hasSymbol && comp[Symbol.toStringTag] === 'Module')
19+
) {
1620
comp = comp.default
1721
}
1822
return isObject(comp)

0 commit comments

Comments
 (0)