]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): ensure defineComponent name in extraOptions takes higher priority
authorEvan You <yyx990803@gmail.com>
Mon, 8 May 2023 04:06:39 +0000 (12:06 +0800)
committerEvan You <yyx990803@gmail.com>
Mon, 8 May 2023 04:06:49 +0000 (12:06 +0800)
packages/runtime-core/src/apiDefineComponent.ts

index 722a3693e3f4f616a5843c242c306668cfabca23..9edb9965e27c03846df3376772b36d5a45053708 100644 (file)
@@ -279,6 +279,6 @@ export function defineComponent(
   extraOptions?: ComponentOptions
 ) {
   return isFunction(options)
-    ? extend({}, extraOptions, { setup: options, name: options.name })
+    ? extend({ name: options.name }, extraOptions, { setup: options })
     : options
 }