From 04572f05eaeae802fdd0323242fadfbfadcde540 Mon Sep 17 00:00:00 2001 From: oysand Date: Mon, 1 Jul 2024 15:25:22 +0200 Subject: [PATCH] Add describing comment --- frontend/src/components/Contexts/RobotContext.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/Contexts/RobotContext.tsx b/frontend/src/components/Contexts/RobotContext.tsx index 8cc14c35..51f4afb8 100644 --- a/frontend/src/components/Contexts/RobotContext.tsx +++ b/frontend/src/components/Contexts/RobotContext.tsx @@ -41,6 +41,7 @@ export const RobotProvider: FC = ({ children }) => { }) registerEvent(SignalREventLabels.robotUpdated, (username: string, message: string) => { let updatedRobot: Robot = JSON.parse(message) + // The check below makes it so that it is not treated as null in the code. if (updatedRobot.model.type == null) { console.warn('Received robot update with model type null') return