fixing the i2c sensors card erroring out when coming back to the page from support view

This commit is contained in:
csawatzky 2025-08-28 11:58:51 -06:00
parent 78e51ac797
commit 732b3d2ab0

View file

@ -226,9 +226,7 @@ export default function DeviceScannedComponents(props: Props){
<Button variant="contained" color="primary" onClick={()=>{removeScan(scannedI2C.key)}}>Clear Scan</Button>
</Box>
{validCompAddresses.length > 0 ? validCompAddresses.map((addr, index) => {
return (
<ScannedI2C key={index} sensorNum={index+1} addressData={addr} deviceProduct={device.settings.product} componentSelectionCallback={componentSelection} availablePositions={availablePositions.get(quack.AddressType.ADDRESS_TYPE_I2C) ?? []}/>
)
return <ScannedI2C key={index} sensorNum={index+1} addressData={addr} deviceProduct={device.settings.product} componentSelectionCallback={componentSelection} availablePositions={availablePositions.get(quack.AddressType.ADDRESS_TYPE_I2C) ?? new Map<quack.ComponentType, number[]>()}/>
}) :
<Box sx={{
margin: 1,