Props set on route contains an extra default key

Hi all
I'm migrating a Vue 3 SSR project to Nuxt and I'm seeing a different behavior when defining the props on a route.

e.g:

{
    name: 'vertragsauswahl',
    path: '/vertragsauswahl',
    components: {
        default: () => import('~/components/ContractSelection/ContractSelection.vue'),
    },
    meta: {
        trackingId: 'ContractSelection',
        layout: 'MasterLayout',
        isRestricted: true,
        middleware: [...PROTECTED_MIDDLEWARE_LIST],
    },
    props: {
        default: contractSelectionStaticContent,
        servicesheet: contractSelectionStaticContent,
    },
},


When checking the data from the route on Nuxt this is generating
props: {
    default: {
        default: {
            id: 'some-id',
            name: 'some-name',
            type: 'some-type',
            value: 'some-value'
        },
        servicesheet: {
            id: 'some-id',
            name: 'some-name',
            type: 'some-type',
            value: 'some-value'
        }
    }
}


instead of

props: {
    default: {
        id: 'some-id',
        name: 'some-name',
        type: 'some-type',
        value: 'some-value'
    },
    servicesheet: {
        id: 'some-id',
        name: 'some-name',
        type: 'some-type',
        value: 'some-value'
    }
}


I do also have a prop where I do props: true but when rendering the route I get a warning saying that the required prop is undefined

Anyone has an idea of what's going on?

Thanks
Was this page helpful?