]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: fix v3 render fn detection regex
authorEvan You <yyx990803@gmail.com>
Thu, 6 May 2021 20:18:00 +0000 (16:18 -0400)
committerEvan You <yyx990803@gmail.com>
Thu, 6 May 2021 20:18:00 +0000 (16:18 -0400)
packages/runtime-core/src/compat/renderFn.ts

index 44df5cbe8410156b3a51d025468a9fdd3f886510..c65cc8d79df039b663a49ee1caa5a1efb6f28a6b 100644 (file)
@@ -39,7 +39,7 @@ import {
 } from './compatConfig'
 import { compatModelEventPrefix } from './componentVModel'
 
-const v3CompiledRenderFnRE = /^(?:function \w+)?\(_ctx, _cache/
+const v3CompiledRenderFnRE = /^(?:function \w*)?\(_ctx, _cache/
 
 export function convertLegacyRenderFn(instance: ComponentInternalInstance) {
   const Component = instance.type as ComponentOptions