Skip to content

Commit e1a56dd

Browse files
committed
Update a new more nullish checks
1 parent d4a58a6 commit e1a56dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/ql-vscode/src/view/results/alert-table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,15 @@ export class PathTable extends React.Component<PathTableProps, PathTableState> {
340340
if (event.direction === NavigationDirection.right) {
341341
// When stepping right, expand to ensure the selected node is visible
342342
expanded.add(Keys.keyToString({ resultIndex: key.resultIndex }));
343-
if (key.pathIndex != null) {
343+
if (key.pathIndex !== undefined) {
344344
expanded.add(Keys.keyToString({ resultIndex: key.resultIndex, pathIndex: key.pathIndex }));
345345
}
346346
} else if (event.direction === NavigationDirection.left) {
347347
// When stepping left, collapse immediately
348348
expanded.delete(Keys.keyToString(key));
349349
} else {
350350
// When stepping up or down, collapse the previous node
351-
if (prevState.selectedItem != null) {
351+
if (prevState.selectedItem !== undefined) {
352352
expanded.delete(Keys.keyToString(prevState.selectedItem));
353353
}
354354
}

0 commit comments

Comments
 (0)