From e3c6dd26c40777f87e41b5bb3e29108b5208aa55 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Tue, 16 Oct 2018 06:48:54 +0530 Subject: [PATCH] FIX: Do not set null value to remove cookie --- app/assets/javascripts/discourse/controllers/login.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/login.js.es6 b/app/assets/javascripts/discourse/controllers/login.js.es6 index c3aecebae0c..1729950acf3 100644 --- a/app/assets/javascripts/discourse/controllers/login.js.es6 +++ b/app/assets/javascripts/discourse/controllers/login.js.es6 @@ -327,7 +327,7 @@ export default Ember.Controller.extend(ModalFunctionality, { $.cookie("destination_url") || options.destination_url; if (destinationUrl) { // redirect client to the original URL - $.cookie("destination_url", null); + $.removeCookie("destination_url"); window.location.href = destinationUrl; } else if (window.location.pathname === Discourse.getURL("/login")) { window.location.pathname = Discourse.getURL("/");