File tree Expand file tree Collapse file tree 1 file changed +8
-15
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -1027,21 +1027,14 @@ function handleSetupResult(
10271027 devRender ( instance )
10281028 }
10291029 } else {
1030- if ( component . render ) {
1031- if ( ! isBlock ( setupResult ) ) instance . setupState = setupResult
1032- instance . block =
1033- callWithErrorHandling (
1034- component . render ,
1035- instance ,
1036- ErrorCodes . RENDER_FUNCTION ,
1037- [
1038- instance . setupState ,
1039- instance . props ,
1040- instance . emit ,
1041- instance . attrs ,
1042- instance . slots ,
1043- ] ,
1044- ) || [ ]
1030+ // component has a render function but no setup function
1031+ // (typically components with only a template and no state)
1032+ if ( setupResult === EMPTY_OBJ && component . render ) {
1033+ instance . block = callWithErrorHandling (
1034+ component . render ,
1035+ instance ,
1036+ ErrorCodes . RENDER_FUNCTION ,
1037+ )
10451038 } else {
10461039 // in prod result can only be block
10471040 instance . block = setupResult as Block
You can’t perform that action at this time.
0 commit comments