File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -911,7 +911,7 @@ describe('RouterLink', () => {
911911 ` ,
912912 components : { RouterLink } ,
913913 directives : { Directive } ,
914- name : 'AppLink'
914+ name : 'AppLink' ,
915915 } )
916916
917917 const { wrapper } = await factory (
Original file line number Diff line number Diff line change @@ -263,8 +263,8 @@ export function useLink<Name extends keyof RouteMap = keyof RouteMap>(
263263 }
264264}
265265
266- function preferSingleVNode < T > ( vnodes : T | T [ ] ) {
267- return isArray ( vnodes ) && vnodes . length === 1 ? vnodes [ 0 ] : vnodes
266+ function preferSingleVNode ( vnodes : VNode [ ] ) {
267+ return vnodes . length === 1 ? vnodes [ 0 ] : vnodes
268268}
269269
270270export const RouterLinkImpl = /*#__PURE__*/ defineComponent ( {
@@ -311,7 +311,7 @@ export const RouterLinkImpl = /*#__PURE__*/ defineComponent({
311311 } ) )
312312
313313 return ( ) => {
314- const children = preferSingleVNode ( slots . default && slots . default ( link ) )
314+ const children = slots . default && preferSingleVNode ( slots . default ( link ) )
315315 return props . custom
316316 ? children
317317 : h (
You can’t perform that action at this time.
0 commit comments