This commit is contained in:
David Reed 2023-03-24 23:35:13 -04:00
parent b06c4cb2cd
commit d7369a3ef7
No known key found for this signature in database
GPG key ID: 2211691D8A1EE72F

View file

@ -295,15 +295,14 @@ function __uvHook(window) {
}); });
client.document.on('setCookie', (event) => { client.document.on('setCookie', (event) => {
Promise.resolve( __uv.cookie.db().then((db) => {
__uv.cookie.setCookies(event.data.value, __uv.db, __uv.meta) __uv.cookie.setCookies(event.data.value, db, __uv.meta);
).then(() => {
__uv.cookie.db().then((db) => { __uv.cookie.getCookies(db).then((cookies) => {
__uv.cookie.getCookies(db).then((cookies) => { cookieStr = __uv.cookie.serialize(cookies, __uv.meta, true);
cookieStr = __uv.cookie.serialize(cookies, __uv.meta, true);
});
}); });
}); });
const cookie = __uv.cookie.setCookie(event.data.value)[0]; const cookie = __uv.cookie.setCookie(event.data.value)[0];
if (!cookie.path) cookie.path = '/'; if (!cookie.path) cookie.path = '/';