Skip to content

Commit

Permalink
fix: small fix to make it compatible with older browsers (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
cevr authored May 1, 2024
1 parent f2baf77 commit f33ed87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const hints = [
${Object.values(hints)
.map((hint) => {
const cookieName = JSON.stringify(hint.cookieName)
return `{ name: ${cookieName}, actual: String(${hint.getValueCode}), value: cookies[${cookieName}] ?? encodeURIComponent("${hint.fallback}") }`
return `{ name: ${cookieName}, actual: String(${hint.getValueCode}), value: cookies[${cookieName}] != null ? cookies[${cookieName}] : encodeURIComponent("${hint.fallback}") }`
})
.join(',\n')}
];
Expand Down

0 comments on commit f33ed87

Please sign in to comment.