diff --git a/packages/runtime-core/src/helpers/resolveAssets.ts b/packages/runtime-core/src/helpers/resolveAssets.ts index 40440f6c..8cb134d5 100644 --- a/packages/runtime-core/src/helpers/resolveAssets.ts +++ b/packages/runtime-core/src/helpers/resolveAssets.ts @@ -77,7 +77,11 @@ function resolveAsset( if (__DEV__) { if (res) { // in dev, infer anonymous component's name based on registered name - if (type === COMPONENTS && !(res as Component).name) { + if ( + type === COMPONENTS && + isObject(res) && + !(res as ComponentOptions).name + ) { ;(res as ComponentOptions).name = name } } else if (warnMissing) {