Skip to content

Commit f455870

Browse files
committed
Fix bug where empty string is a valid focusKey
1 parent 12255c9 commit f455870

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-sunbeam/src/focus/FocusableNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class FocusableNode implements IFocusableNode {
3131
customGetPreferredChild?: CustomGetPreferredChildFn
3232
lock: Direction[] | Direction | undefined
3333
}) {
34-
focusKey = focusKey ?? `focusable:${randomId()}`
34+
focusKey = focusKey || `focusable:${randomId()}`
3535
this.focusKey = focusKey
3636
this.path = [...parentPath, focusKey]
3737
this.getBoundingBox = getBoundingBox

0 commit comments

Comments
 (0)