Skip to content

Commit

Permalink
πŸ› Fix TypeError when document.cookie is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickadam committed May 6, 2023
1 parent de04f8a commit b947b38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion developer-extension/src/panel/hooks/useSdkInfos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function getInfos(): Promise<SdkInfos> {
`
const cookieRawValue = document.cookie
.split(';')
.map(cookie => cookie.match(/(\\S*?)=(.*)/).slice(1))
.map(cookie => cookie.match(/(\\S*?)=(.*)/)?.slice(1) || [])
.find(([name, _]) => name === '_dd_s')
?.[1]
Expand Down

0 comments on commit b947b38

Please sign in to comment.