Skip to content

Commit b62d8fb

Browse files
authored
fixing if checks in TableKeyboardDelegate (#2846)
1 parent cc5deac commit b62d8fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/@react-aria/table/src/TableKeyboardDelegate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class TableKeyboardDelegate<T> extends GridKeyboardDelegate<T, TableColle
3636
}
3737

3838
let firstKey = this.getFirstKey();
39-
if (!firstKey) {
39+
if (firstKey == null) {
4040
return;
4141
}
4242

@@ -65,7 +65,7 @@ export class TableKeyboardDelegate<T> extends GridKeyboardDelegate<T, TableColle
6565

6666
// only return above row key if not header row
6767
let superKey = super.getKeyAbove(key);
68-
if (superKey && this.collection.getItem(superKey).type !== 'headerrow') {
68+
if (superKey != null && this.collection.getItem(superKey).type !== 'headerrow') {
6969
return superKey;
7070
}
7171

@@ -152,7 +152,7 @@ export class TableKeyboardDelegate<T> extends GridKeyboardDelegate<T, TableColle
152152

153153
let collection = this.collection;
154154
let key = fromKey ?? this.getFirstKey();
155-
if (!key) {
155+
if (key == null) {
156156
return null;
157157
}
158158

0 commit comments

Comments
 (0)