]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat(runtime-core): respect function name when using `defineComponent` function short...
authorBjarki Hall <bjarkihall@outlook.com>
Tue, 21 Jul 2020 17:15:26 +0000 (17:15 +0000)
committerGitHub <noreply@github.com>
Tue, 21 Jul 2020 17:15:26 +0000 (13:15 -0400)
packages/runtime-core/src/apiDefineComponent.ts

index 1a22c50ff10dc4bee965321338d51690f0cf6ec8..b85e3b3b7326fd6926d795c85f32067e16098bdb 100644 (file)
@@ -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
 }