Skip to content

Commit

Permalink
Add describing comment
Browse files Browse the repository at this point in the history
  • Loading branch information
oysand committed Jul 1, 2024
1 parent af3312a commit 04572f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/Contexts/RobotContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const RobotProvider: FC<Props> = ({ 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
Expand Down

0 comments on commit 04572f0

Please sign in to comment.