Skip to content

Commit 0d86d59

Browse files
baiwusanyu-csxzz
authored andcommitted
chore: updated code
1 parent 4451a17 commit 0d86d59

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

packages/runtime-core/src/helpers/resolveAssets.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,13 @@ function resolveAsset(
111111
return Component
112112
}
113113

114-
if (__DEV__ && warnMissing) {
115-
const isResEmpty = !res
116-
const isNameLateTag = isLateTag(name)
117-
118-
if ((isResEmpty && !isNameLateTag) || (!isResEmpty && isNameLateTag)) {
119-
const extra =
114+
if (__DEV__ && warnMissing && ((!res && !isLateTag(name)) || (res && isLateTag(name)))) {
115+
const extra =
120116
type === COMPONENTS
121-
? `\nIf this is a native custom element, make sure to exclude it from ` +
117+
? `\nIf this is a native custom element, make sure to exclude it from ` +
122118
`component resolution via compilerOptions.isCustomElement.`
123-
: ``
124-
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`)
125-
}
119+
: ``
120+
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`)
126121
}
127122

128123
return res

0 commit comments

Comments
 (0)