Check if entry is undefined first
Summary: Fixes this issue: https://pxl.cl/3dQRs Reviewed By: LukeDefeo Differential Revision: D48682817 fbshipit-source-id: 1bbb40a02dc970ed1c5f2731a85b6ef613ebd2af
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ffae44f446
commit
0c2ef9d00d
@@ -242,8 +242,8 @@ export const ConnectivityLogs = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const onSelection = useCallback(
|
const onSelection = useCallback(
|
||||||
(entry: ConnectionRecordEntry) => {
|
(entry: ConnectionRecordEntry | undefined) => {
|
||||||
if (isShellCommand(entry)) {
|
if (entry !== undefined && isShellCommand(entry)) {
|
||||||
setSelection(entry);
|
setSelection(entry);
|
||||||
} else {
|
} else {
|
||||||
setSelection(undefined);
|
setSelection(undefined);
|
||||||
|
|||||||
Reference in New Issue
Block a user