Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

fix: Can't pass object to template after update the version from 0.32.0 to 0.33.x #728

Open
emretepedev opened this issue Dec 12, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@emretepedev
Copy link

emretepedev commented Dec 12, 2022

πŸ› The bug
I can't pass an object to the template after updating the version from 0.32.0 to 0.33.0.

πŸ› οΈ To reproduce
in {root}/components/Header.vue

<template>
  <div>
    <nuxt-link v-for="page in data.pages" :key="page.title" :to="page.to">
      {{ page.title }}
    </nuxt-link>
  </div>
</template>

<script>
  import { defineComponent } from '@nuxtjs/composition-api'

  export default defineComponent({
    setup() {
      return {
        data: {
          pages: [
            { title: 'Title 1', to: 'To 1' },
            { title: 'Title 2', to: 'To 2' },
          ],
        },
      }
    },
  })
</script>

I got this error: Cannot read properties of undefined (reading 'pages')

My project is public. The original repository here.

🌈 Expected behaviour
I would expect it to work as it did in version 0.32.0.

@emretepedev emretepedev added the bug Something isn't working label Dec 12, 2022
@emretepedev emretepedev changed the title fix: Can't import .js files to .vue files after update the version from 0.32.0 to 0.33.x fix: Can't pass object to template after update the version from 0.32.0 to 0.33.x Dec 12, 2022
@rebinnaf
Copy link

Also if I pass object in props I can't access it in setup, unfortunately the example sandbox is not working to reproduce it :/

@danielroe
Copy link
Member

Would you provide a reproduction? πŸ™

@rchl
Copy link
Member

rchl commented Mar 29, 2023

We'd probably also need a codesanbox that uses this module since there is only one with Nuxt bridge.

That said, I can't reproduce this issue locally. Works just fine for me.

@rebinnaf
Copy link

I checked it more, I think my issue is different from this, I created another issue and reproduced it: #750

It would be nice to have the codesandbox template more accessible.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants