2
0
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:
Declan de Wet
2016-11-16 23:48:39 +02:00
parent d465b4dbb0
commit 08965ae947
+3
View File
@@ -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]
}
},