Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants