mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-24 00:50:34 +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.
|
* @param {Function} Vue - the Vue constructor.
|
||||||
*/
|
*/
|
||||||
function install(Vue, options = {}) {
|
function install(Vue, options = {}) {
|
||||||
|
if (Vue.__vuemeta_installed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
Vue.__vuemeta_installed = true
|
||||||
|
|
||||||
options = setOptions(options)
|
options = setOptions(options)
|
||||||
|
|
||||||
Vue.prototype.$meta = $meta(options)
|
Vue.prototype.$meta = $meta(options)
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ import { hasMetaInfo } from './shared/meta-helpers'
|
|||||||
* @param {Function} Vue - the Vue constructor.
|
* @param {Function} Vue - the Vue constructor.
|
||||||
*/
|
*/
|
||||||
function install(Vue, options = {}) {
|
function install(Vue, options = {}) {
|
||||||
|
if (Vue.__vuemeta_installed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
Vue.__vuemeta_installed = true
|
||||||
|
|
||||||
options = setOptions(options)
|
options = setOptions(options)
|
||||||
|
|
||||||
Vue.prototype.$meta = $meta(options)
|
Vue.prototype.$meta = $meta(options)
|
||||||
|
|||||||
Reference in New Issue
Block a user