antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
549 stars 40 forks source link

Error in w-notification-manager component, using wave-ui with Nuxt js #60

Closed nmauersberg closed 3 years ago

nmauersberg commented 3 years ago

The notification manager is a great improvement! Unfortunately the update to 1.36.0 is not working for me. I am getting the following error:

 ERROR  [Vue warn]: Error in render: "TypeError: Cannot read property 'notifications' of null"                                                                                              15:13:09

found in

---> <WNotificationManager> at src/wave-ui/components/w-notification-manager.vue
       <WApp> at src/wave-ui/components/w-app.vue
         <Layouts/default.vue> at layouts/default.vue
           <Root>

After a look at the "w-notification-manager" component, it seems to me like the "this.notifManager" data prop is still initialized as null, when the computed method tries to access it. Even though it should be instantiated as a "new NotificationManager()" in beforeMount. Maybe some sort of (nuxt-related) timing issue?

I tried debugging, but changes to the source code in the node_module did not apply, since the bundled version is used and I was not able to rebuild the module properly. I also tried deleting node_modules and the package-lock.json, but I keep getting this error, using nuxt js.

antoniandre commented 3 years ago

Hey @nmauersberg,

Yes indeed that's the timing of SSR I didn't take in account, thanks for reporting and finding the cause! Now fixed in version 1.36.1. Please reopen if not solved :)