mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-11 19:42:24 +03:00
fix: prevent vue-meta plugin to be installed twice
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user