Skip to content

Commit

Permalink
Update telemetry.js
Browse files Browse the repository at this point in the history
  • Loading branch information
twitchyvr committed Nov 19, 2023
1 parent b7cbe3f commit f6f31b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/telemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ class Telemetry {

if (!driverInfo) return null

return driverInfo.Drivers?.[driverInfo.DriverCarIdx] ?? null
const driver = driverInfo.Drivers[driverInfo.DriverCarIdx]
return driver !== undefined && driver !== null ? driver : null
}

/**
Expand Down

0 comments on commit f6f31b7

Please sign in to comment.