Skip to content

best way to save what you love

cookie: allow updating cookie values directly

dumbmoron035f5a783948
diff --git a/src/modules/processing/cookie/manager.js b/src/modules/processing/cookie/manager.js
index 6ea05561..7189eb18 100644
--- a/src/modules/processing/cookie/manager.js
+++ b/src/modules/processing/cookie/manager.js
@@ -56,7 +56,10 @@ export function updateCookie(cookie, headers) {
cookie.unset(parsed.filter(c => c.expires < new Date()).map(c => c.name));
parsed.filter(c => !c.expires || c.expires > new Date()).forEach(c => values[c.name] = c.value);
+ updateCookieValues(cookie, values);
+}
+export function updateCookieValues(cookie, values) {
cookie.set(values);
if (Object.keys(values).length) dirty = true
}