fix(nuxt): do not pass prefetched class to custom link (#7522)

This commit is contained in:
Daniel Roe 2022-09-15 08:52:21 +01:00 committed by GitHub
parent 391ba89243
commit 3ed63a6b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,7 +226,7 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
{
ref: process.server ? undefined : (ref: any) => { el!.value = ref?.$el },
to: to.value,
class: prefetched.value && (props.prefetchedClass || options.prefetchedClass),
...((prefetched.value && !props.custom) ? { class: props.prefetchedClass || options.prefetchedClass } : {}),
activeClass: props.activeClass || options.activeClass,
exactActiveClass: props.exactActiveClass || options.exactActiveClass,
replace: props.replace,