Skip to content

Commit

Permalink
Re-ask in case of corrupted telemetry cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebouthinon committed May 31, 2022
1 parent 4be3ad0 commit 1ff9e13
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/services/telemetryCookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export default {
get: () => {
const telemetrySetting = document.cookie.split('telemetry=')[1]
if (telemetrySetting !== undefined) {
return JSON.parse(telemetrySetting)
try {
return JSON.parse(telemetrySetting)
} catch (error) {
return null
}
}

return null
Expand Down

0 comments on commit 1ff9e13

Please sign in to comment.