Skip to content

Commit

Permalink
fix(runtime-core): skip apply mixins if mixinOption is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Nov 21, 2020
1 parent 90bdf59 commit 20da7a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/runtime-core/src/apiCreateApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ export function createAppAPI<HostElement>(

mixin(mixin: ComponentOptions) {
if (__FEATURE_OPTIONS_API__) {
// #2651
if (Object.keys(mixin).length === 0) {
return app
}

if (!context.mixins.includes(mixin)) {
context.mixins.push(mixin)
// global mixin with props/emits de-optimizes props/emits
Expand Down

0 comments on commit 20da7a6

Please sign in to comment.