From 08965ae9474157ec254247aabf9a10ee4098257b Mon Sep 17 00:00:00 2001 From: Declan de Wet Date: Wed, 16 Nov 2016 23:48:39 +0200 Subject: [PATCH] added check for existence of computed property --- src/shared/plugin.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/plugin.js b/src/shared/plugin.js index 529a97d..9ccd32e 100644 --- a/src/shared/plugin.js +++ b/src/shared/plugin.js @@ -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] } },