diff --git a/interface/src/project/DashboardDevices.tsx b/interface/src/project/DashboardDevices.tsx index f59047e3f..d95bc9f3a 100644 --- a/interface/src/project/DashboardDevices.tsx +++ b/interface/src/project/DashboardDevices.tsx @@ -94,8 +94,14 @@ const DashboardDevices: FC = () => { }, []); const leftOffset = () => { - const left = document.getElementById('devices-window')?.getBoundingClientRect().left; - const right = document.getElementById('devices-window')?.getBoundingClientRect().right; + const devicesWindow = document.getElementById('devices-window'); + if (!devicesWindow) { + return 0; + } + + const clientRect = devicesWindow.getBoundingClientRect(); + const left = clientRect.left; + const right = clientRect.right; if (!left || !right) { return 0; @@ -416,11 +422,11 @@ const DashboardDevices: FC = () => { const renderCoreData = () => ( {!coreData.connected && } - {coreData.connected && coreData.devices.length === 0 && ( + {/* {coreData.connected && coreData.devices.length === 0 && ( - )} + )} */} - {coreData.devices.length !== 0 && ( + {coreData.connected && ( {(tableList: any) => ( <>