Don't use cookie when logged in.
This commit is contained in:
parent
31f6737f92
commit
6bb6821d39
|
@ -10,12 +10,15 @@
|
||||||
window.scrollTo(0, document.body.scrollHeight);
|
window.scrollTo(0, document.body.scrollHeight);
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not username %}
|
||||||
if (window.location.search.includes("reset=true")) {
|
if (window.location.search.includes("reset=true")) {
|
||||||
window.history.pushState({}, document.title, window.location.pathname);
|
window.history.pushState({}, document.title, window.location.pathname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
decodeURIComponent(document.cookie).split(';').forEach(cookie => {
|
const cookies = decodeURIComponent(document.cookie)
|
||||||
[id, value] = cookie.trim().split('=')
|
.split(';')
|
||||||
|
.map(cookie => cookie.trim().split('='))
|
||||||
|
cookies.forEach(([id, value]) => {
|
||||||
if (!id || !value) {
|
if (!id || !value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -24,6 +27,7 @@
|
||||||
e.value = value
|
e.value = value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
{% endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
const clearErrors = () => {
|
const clearErrors = () => {
|
||||||
|
|
Loading…
Reference in New Issue