Skip to content

Commit

Permalink
Update iframe.html
Browse files Browse the repository at this point in the history
  • Loading branch information
vpodk committed Dec 19, 2024
1 parent 2a6c8c7 commit 5e4c3e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demo/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
.split("; ")
.find((cookie) => cookie.startsWith(name + "="));

const cookie = (pair || "").split("=")[1];
if (cookie) {
const value = (pair || "").split("=")[1];
if (value) {
try {
return JSON.parse(atob(decodeURIComponent(cookie)));
return JSON.parse(atob(decodeURIComponent(value)));
} catch (ex) {
console.error("[IFRAME] Coult not parse cookie:", cookie, ex);
console.error("[IFRAME] Could not parse cookie:", value, ex);
}
}
return null;
Expand Down

0 comments on commit 5e4c3e5

Please sign in to comment.