From: Bjarki Hall Date: Tue, 21 Jul 2020 17:15:26 +0000 (+0000) Subject: feat(runtime-core): respect function name when using `defineComponent` function short... X-Git-Tag: v3.0.0-rc.3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=304830a764cd9f28098cfb0ac0e520e1bb2f57c7;p=thirdparty%2Fvuejs%2Fcore.git feat(runtime-core): respect function name when using `defineComponent` function shorthand (#1661) --- diff --git a/packages/runtime-core/src/apiDefineComponent.ts b/packages/runtime-core/src/apiDefineComponent.ts index 1a22c50ff1..b85e3b3b73 100644 --- a/packages/runtime-core/src/apiDefineComponent.ts +++ b/packages/runtime-core/src/apiDefineComponent.ts @@ -205,5 +205,7 @@ export function defineComponent< // implementation, close to no-op export function defineComponent(options: unknown) { - return isFunction(options) ? { setup: options } : options + return isFunction(options) + ? { setup: options, name: options.name } + : options }