Преглед изворни кода

wip: fix v3 render fn detection regex

Evan You пре 5 година
родитељ
комит
fa48722441
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      packages/runtime-core/src/compat/renderFn.ts

+ 1 - 1
packages/runtime-core/src/compat/renderFn.ts

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