FIX: Do not set null value to remove cookie

This commit is contained in:
Vinoth Kannan 2018-10-16 06:12:32 +05:30
parent b06dccac49
commit 08c404e138
4 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ export default Ember.Component.extend(
let notices = []; let notices = [];
if ($.cookie("dosp") === "1") { if ($.cookie("dosp") === "1") {
$.cookie("dosp", null, { path: "/" }); $.removeCookie("dosp", { path: "/" });
notices.push([I18n.t("forced_anonymous"), "forced-anonymous"]); notices.push([I18n.t("forced_anonymous"), "forced-anonymous"]);
} }

View File

@ -260,12 +260,12 @@ export default Ember.Controller.extend(
this.get("rejectedPasswords").pushObject(attrs.accountPassword); this.get("rejectedPasswords").pushObject(attrs.accountPassword);
} }
this.set("formSubmitted", false); this.set("formSubmitted", false);
$.cookie("destination_url", null); $.removeCookie("destination_url");
} }
}, },
() => { () => {
this.set("formSubmitted", false); this.set("formSubmitted", false);
$.cookie("destination_url", null); $.removeCookie("destination_url");
return this.flash(I18n.t("create_account.failed"), "error"); return this.flash(I18n.t("create_account.failed"), "error");
} }
); );

View File

@ -158,12 +158,12 @@ export default Ember.Controller.extend(ModalFunctionality, {
.val(self.get("loginPassword")); .val(self.get("loginPassword"));
if (ssoDestinationUrl) { if (ssoDestinationUrl) {
$.cookie("sso_destination_url", null); $.removeCookie("sso_destination_url");
window.location.assign(ssoDestinationUrl); window.location.assign(ssoDestinationUrl);
return; return;
} else if (destinationUrl) { } else if (destinationUrl) {
// redirect client to the original URL // redirect client to the original URL
$.cookie("destination_url", null); $.removeCookie("destination_url");
$hidden_login_form $hidden_login_form
.find("input[name=redirect]") .find("input[name=redirect]")
.val(destinationUrl); .val(destinationUrl);

View File

@ -38,7 +38,7 @@ export function setLocalTheme(ids, themeSeq) {
expires: 9999 expires: 9999
}); });
} else { } else {
$.cookie("theme_ids", null, { path: "/", expires: 1 }); $.removeCookie("theme_ids", { path: "/", expires: 1 });
} }
} }