Skip to content

Commit

Permalink
added check for existence of computed property
Browse files Browse the repository at this point in the history
  • Loading branch information
zspecza committed Nov 16, 2016
1 parent d465b4d commit 08965ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shared/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
},
Expand Down

0 comments on commit 08965ae

Please sign in to comment.