Vue-meta: metaInfo doesn't have an access to computed properties Vue-meta: metaInfo doesn't have an access to computed properties vue.js vue.js

Vue-meta: metaInfo doesn't have an access to computed properties


vue-meta just creates computed property from your metaInfo function (according to plugin source code), so I assume that your loadViewPage action fills data object asynchronously and your problem just transforms to null-checking problem.

So you should check data before using its properties, and when data will be loaded metaInfo will update object as well:

     metaInfo() {         // don't know your return object structure,          // maybe you should check whole this.getViewPage         let data = this.getViewPage.data;          return {             title: data ? data.meta.title : "some placeholder title",         }     };


matomo