Skip to content

Commit 5929f33

Browse files
zhiyuanzmjCopilot
andauthored
Update packages/runtime-vapor/src/component.ts
Co-authored-by: Copilot <[email protected]>
1 parent 1385e4a commit 5929f33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/runtime-vapor/src/component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,9 @@ function handleSetupResult(
972972
devRender(instance)
973973
}
974974
} else {
975-
// component has a render function but no setup function
976-
// (typically components with only a template and no state)
975+
// component has a render function with either:
976+
// - no setup function (components with only a template)
977+
// - setup returning non-block state for use in render
977978
// support setup fn and render fn co-usage for defineComponent expose
978979
if (!isBlock(setupResult) && component.render) {
979980
instance.setupState = setupResult

0 commit comments

Comments
 (0)