Skip to content

Commit

Permalink
chore: updated code
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwusanyu-c authored and sxzz committed Oct 28, 2023
1 parent 4451a17 commit 0d86d59
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions packages/runtime-core/src/helpers/resolveAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,13 @@ function resolveAsset(
return Component
}

if (__DEV__ && warnMissing) {
const isResEmpty = !res
const isNameLateTag = isLateTag(name)

if ((isResEmpty && !isNameLateTag) || (!isResEmpty && isNameLateTag)) {
const extra =
if (__DEV__ && warnMissing && ((!res && !isLateTag(name)) || (res && isLateTag(name)))) {
const extra =
type === COMPONENTS
? `\nIf this is a native custom element, make sure to exclude it from ` +
? `\nIf this is a native custom element, make sure to exclude it from ` +
`component resolution via compilerOptions.isCustomElement.`
: ``
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`)
}
: ``
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`)
}

return res
Expand Down

0 comments on commit 0d86d59

Please sign in to comment.