Skip to content

Commit 2c92a8d

Browse files
committed
set props assignment to empty object if elem or elem.props is nullish
1 parent 0852007 commit 2c92a8d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/hooks/useTransition.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,7 @@ export function useTransition(
436436
const key = is.str(t.key) || is.num(t.key) ? t.key : t.ctrl.id
437437
const isLegacyReact = React.version < '19.0.0'
438438

439-
const props = {
440-
...elem.props,
441-
}
439+
const props = elem?.props ?? {}
442440

443441
if (isLegacyReact) {
444442
props.ref = elem.ref

0 commit comments

Comments
 (0)