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

I got error when I use @Observer before @Component with Nuxtjs #32

Open
Him-2C opened this issue Aug 28, 2019 · 4 comments
Open

I got error when I use @Observer before @Component with Nuxtjs #32

Him-2C opened this issue Aug 28, 2019 · 4 comments

Comments

@Him-2C
Copy link

Him-2C commented Aug 28, 2019

I use Nuxt + typescript and run with 'universal' mode.

I got error when I refresh browser with this code

@Observer
@Component()
export default class Home extends Vue {
  mounted () {
  }
}

Is don't have any error when I try with

export default observer({
  mounted () {
  }
});

error TypeError: Cannot convert undefined or null to object
at Function.getOwnPropertyNames ()
at Home.Component._init (vendors.app.js:2672)
at Home.Vue (commons.app.js:16802)
at new Home (inspire.js:64)
at collectDataFromConstructor (vendors.app.js:2692)
at data (vendors.app.js:2767)
at collectData (inspire.js:28)
at VueComponent.data (inspire.js:111)
at VueComponent.Component.options.data (app.js:3171)
at getData (commons.app.js:16467)

@Him-2C Him-2C changed the title I got error when I use @Observer before @Component. I got error when I use @Observer before @Component with Nuxtjs Aug 28, 2019
@kuitos
Copy link
Member

kuitos commented Aug 28, 2019

Could u pls provide a minimum reproduction with codesandbox?

@Him-2C
Copy link
Author

Him-2C commented Aug 28, 2019

@Him-2C
Copy link
Author

Him-2C commented Aug 29, 2019

@Him-2C
Copy link
Author

Him-2C commented Sep 29, 2019

solved with

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants