mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2026-03-27 09:28:43 +07:00
handle string-json in cookie script
This commit is contained in:
@@ -11,7 +11,8 @@ if (docsConsent && docsConsent.analytics === true) {
|
||||
|
||||
// If the user already has the n8n-consent cookie, accept cookies in docs as well
|
||||
let n8nCookieConsent = getCookie("n8n-consent");
|
||||
console.log("cs1 " + n8nCookieConsent);
|
||||
console.log(typeOf(n8nCookieConsent));
|
||||
n8nCookieConsent = JSON.parse(n8nCookieConsent);
|
||||
if(n8nCookieConsent && n8nCookieConsent === true) {
|
||||
console.log("cs2 " + n8nCookieConsent);
|
||||
__md_set("__consent", {"analytics": true})
|
||||
|
||||
Reference in New Issue
Block a user