]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: no longer need to wrap legacy render fn
authorEvan You <yyx990803@gmail.com>
Wed, 3 Oct 2018 17:09:52 +0000 (13:09 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 3 Oct 2018 17:09:52 +0000 (13:09 -0400)
packages/core/src/componentUtils.ts

index 1a3075105065b6b6c25af7bfec223cf2b91dea79..2c747a7f7bb6bed4f56fb92adf1a4ea249146e44 100644 (file)
@@ -167,7 +167,6 @@ export function shouldUpdateFunctionalComponent(
   return shouldUpdate
 }
 
-// compat only
 export function createComponentClassFromOptions(
   options: ComponentOptions
 ): ComponentClass {
@@ -180,13 +179,7 @@ export function createComponentClassFromOptions(
   for (const key in options) {
     const value = options[key]
     if (typeof value === 'function') {
-      ;(ObjectComponent.prototype as any)[key] =
-        key === 'render'
-          ? // normalize render for legacy signature
-            function render() {
-              return value.call(this, h)
-            }
-          : value
+      ;(ObjectComponent.prototype as any)[key] = value
     }
     if (key === 'computed') {
       const isGet = typeof value === 'function'