fix(runtime-core): only infer component name for object components
close #1023
This commit is contained in:
parent
2bb6f9b5c9
commit
e422b8b082
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user