diff --git a/app/assets/javascripts/discourse/components/global-notice.js.es6 b/app/assets/javascripts/discourse/components/global-notice.js.es6 index 327f6aa79a..5041da1713 100644 --- a/app/assets/javascripts/discourse/components/global-notice.js.es6 +++ b/app/assets/javascripts/discourse/components/global-notice.js.es6 @@ -11,7 +11,7 @@ export default Ember.Component.extend( let notices = []; if ($.cookie("dosp") === "1") { - $.cookie("dosp", null, { path: "/" }); + $.removeCookie("dosp", { path: "/" }); notices.push([I18n.t("forced_anonymous"), "forced-anonymous"]); } diff --git a/app/assets/javascripts/discourse/controllers/create-account.js.es6 b/app/assets/javascripts/discourse/controllers/create-account.js.es6 index 22848d8a2f..c4f1b20fc5 100644 --- a/app/assets/javascripts/discourse/controllers/create-account.js.es6 +++ b/app/assets/javascripts/discourse/controllers/create-account.js.es6 @@ -260,12 +260,12 @@ export default Ember.Controller.extend( this.get("rejectedPasswords").pushObject(attrs.accountPassword); } this.set("formSubmitted", false); - $.cookie("destination_url", null); + $.removeCookie("destination_url"); } }, () => { this.set("formSubmitted", false); - $.cookie("destination_url", null); + $.removeCookie("destination_url"); return this.flash(I18n.t("create_account.failed"), "error"); } ); diff --git a/app/assets/javascripts/discourse/controllers/login.js.es6 b/app/assets/javascripts/discourse/controllers/login.js.es6 index 7d10818420..c3aecebae0 100644 --- a/app/assets/javascripts/discourse/controllers/login.js.es6 +++ b/app/assets/javascripts/discourse/controllers/login.js.es6 @@ -158,12 +158,12 @@ export default Ember.Controller.extend(ModalFunctionality, { .val(self.get("loginPassword")); if (ssoDestinationUrl) { - $.cookie("sso_destination_url", null); + $.removeCookie("sso_destination_url"); window.location.assign(ssoDestinationUrl); return; } else if (destinationUrl) { // redirect client to the original URL - $.cookie("destination_url", null); + $.removeCookie("destination_url"); $hidden_login_form .find("input[name=redirect]") .val(destinationUrl); diff --git a/app/assets/javascripts/discourse/lib/theme-selector.js.es6 b/app/assets/javascripts/discourse/lib/theme-selector.js.es6 index ce806b4496..69a2eeb935 100644 --- a/app/assets/javascripts/discourse/lib/theme-selector.js.es6 +++ b/app/assets/javascripts/discourse/lib/theme-selector.js.es6 @@ -38,7 +38,7 @@ export function setLocalTheme(ids, themeSeq) { expires: 9999 }); } else { - $.cookie("theme_ids", null, { path: "/", expires: 1 }); + $.removeCookie("theme_ids", { path: "/", expires: 1 }); } }