fix: fix option merge global mixins presence check

This commit is contained in:
Evan You 2020-03-24 12:59:33 -04:00
parent dbbd9990e0
commit 10ad965100

View File

@ -516,9 +516,9 @@ export function resolveMergedOptions(
const { __merged, mixins, extends: extendsOptions } = raw
if (__merged) return __merged
const globalMixins = instance.appContext.mixins
if (!globalMixins && !mixins && !extendsOptions) return raw
if (!globalMixins.length && !mixins && !extendsOptions) return raw
const options = {}
globalMixins && globalMixins.forEach(m => mergeOptions(options, m, instance))
globalMixins.forEach(m => mergeOptions(options, m, instance))
extendsOptions && mergeOptions(options, extendsOptions, instance)
mixins && mixins.forEach(m => mergeOptions(options, m, instance))
mergeOptions(options, raw, instance)