Really delete the cookie

It appears that setting the domain on the cookie prevents it from actually deleting the cookie.
This commit is contained in:
Chris Garrity 2020-01-30 09:43:51 -05:00
parent f9b85c7884
commit 70cef7335b

View file

@ -21,7 +21,7 @@ const jar = require('./lib/jar');
} else {
// delete the old cookie (just hostname) by setting it to null and expiring in the past
/* eslint-disable max-len */
document.cookie = `scratchlanguage=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${window.location.hostname}`;
document.cookie = `scratchlanguage=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
/* eslint-enable max-len */
// create the new cookie
let opts = {};