diff --git a/src/browser.js b/src/browser.js index 73693f0..3891522 100644 --- a/src/browser.js +++ b/src/browser.js @@ -10,6 +10,12 @@ import { hasMetaInfo } from './shared/meta-helpers' * @param {Function} Vue - the Vue constructor. */ function install(Vue, options = {}) { + if (Vue.__vuemeta_installed) { + return + } + + Vue.__vuemeta_installed = true + options = setOptions(options) Vue.prototype.$meta = $meta(options) diff --git a/src/index.js b/src/index.js index 303c73d..6ee009a 100644 --- a/src/index.js +++ b/src/index.js @@ -9,6 +9,12 @@ import { hasMetaInfo } from './shared/meta-helpers' * @param {Function} Vue - the Vue constructor. */ function install(Vue, options = {}) { + if (Vue.__vuemeta_installed) { + return + } + + Vue.__vuemeta_installed = true + options = setOptions(options) Vue.prototype.$meta = $meta(options)