From 20da7a6af29cfd7471d476921ac206dc881fb003 Mon Sep 17 00:00:00 2001 From: daiwei Date: Sat, 21 Nov 2020 11:38:30 +0800 Subject: [PATCH] fix(runtime-core): skip apply mixins if mixinOption is empty --- packages/runtime-core/src/apiCreateApp.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index bcb2fec1c32..d9b0f24baf4 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -176,6 +176,11 @@ export function createAppAPI( 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