From 195d79dce0ea424aeea78e8ad35ece83bd708641 Mon Sep 17 00:00:00 2001 From: Regis Date: Thu, 1 Sep 2016 05:38:58 -0600 Subject: path const and prevent default location --- app/assets/javascripts/user.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/user.js.es6 b/app/assets/javascripts/user.js.es6 index c934afa458a..d644a1c0bc6 100644 --- a/app/assets/javascripts/user.js.es6 +++ b/app/assets/javascripts/user.js.es6 @@ -22,12 +22,12 @@ hideProjectLimitMessage() { $('.hide-project-limit-message').on('click', e => { - const path = '/'; + e.preventDefault(); + const path = gon.relative_url_root || '/'; $.cookie('hide_project_limit_message', 'false', { path: path }); $(this).parents('.project-limit-message').remove(); - e.preventDefault(); return; }); } -- cgit v1.2.1