Skip to content

Commit

Permalink
fix(hooks): Always return the cookie value for getCookie
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-nfc committed Oct 3, 2024
1 parent 7635ace commit 0af4e05
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/hooks/getCookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export function getCookie(name) {

const cookies = document.cookie.split(';');

console.log(`found cookies (${cookies})`)

for (let i = 0; i < cookies.length; i++) {

Expand All @@ -31,7 +30,6 @@ export function getCookie(name) {

}

console.log(`Cookie Value (${value})`)

return null
return value
}

0 comments on commit 0af4e05

Please sign in to comment.