fix(vue-app): check plugin key on Vue.prototype instead of Vue (#7656)

This commit is contained in:
Denis Karabaza 2020-07-02 19:43:32 +03:00 committed by GitHub
parent b6a5349d2d
commit d4363d4477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,7 +189,7 @@ async function createApp(ssrContext, config = {}) {
Vue[installKey] = true Vue[installKey] = true
// Call Vue.use() to install the plugin into vm // Call Vue.use() to install the plugin into vm
Vue.use(() => { Vue.use(() => {
if (!Object.prototype.hasOwnProperty.call(Vue, key)) { if (!Object.prototype.hasOwnProperty.call(Vue.prototype, key)) {
Object.defineProperty(Vue.prototype, key, { Object.defineProperty(Vue.prototype, key, {
get () { get () {
return this.$root.$options[key] return this.$root.$options[key]