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("/");