Fixed #5980 - Nuxt module component autoImport in v4 rc3 doesn't work with component prefixes
parent
8f1952d1f0
commit
ff96f62e7a
|
@ -28,7 +28,7 @@ export function PrimeVueResolver(options: PrimeVueResolverOptions = {}): Compone
|
|||
resolve: (name: string) => {
|
||||
const { prefix } = options.components || {};
|
||||
const cName = getName(name, prefix);
|
||||
const cMeta = components.find((c) => c.name.toLocaleLowerCase() === cName.toLocaleLowerCase());
|
||||
const cMeta = components.find((c) => c.name.toLocaleLowerCase() === cName?.toLocaleLowerCase());
|
||||
|
||||
if (cMeta) {
|
||||
return (
|
||||
|
@ -44,7 +44,7 @@ export function PrimeVueResolver(options: PrimeVueResolverOptions = {}): Compone
|
|||
resolve: (name: string) => {
|
||||
const { prefix } = options.directives || {};
|
||||
const dName = getName(name, prefix);
|
||||
const dMeta = directives.find((d) => d.name.toLocaleLowerCase() === dName.toLocaleLowerCase());
|
||||
const dMeta = directives.find((d) => d.name.toLocaleLowerCase() === dName?.toLocaleLowerCase());
|
||||
|
||||
if (dMeta) {
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue