mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-20 08:50:33 +03:00
added check for existence of computed property
This commit is contained in:
@@ -42,6 +42,9 @@ export default function VueMeta (Vue, options = {}) {
|
||||
// coerce function-style metaInfo to a computed prop so we can observe
|
||||
// it on creation
|
||||
if (typeof this.$options[options.keyName] === 'function') {
|
||||
if (typeof this.$options.computed === 'undefined') {
|
||||
this.$options.computed = {}
|
||||
}
|
||||
this.$options.computed.$metaInfo = this.$options[options.keyName]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user