diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-03-02 12:26:02 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-03-02 12:26:02 -0500 |
commit | 7ff635d946325c4b68657efc7f8a0aee87d8532b (patch) | |
tree | de8d56bdde942d63a5a7ebb5da726b0c4ee591be /app | |
parent | 2b9e5c99961261bc3c9419cf9bb29c115c59eb99 (diff) | |
download | gitlab-ce-7ff635d946325c4b68657efc7f8a0aee87d8532b.tar.gz |
Remove trailing slashes
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/user_tabs.js.coffee | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/user_tabs.js.coffee b/app/assets/javascripts/user_tabs.js.coffee index 0d26f49095d..2972f33e786 100644 --- a/app/assets/javascripts/user_tabs.js.coffee +++ b/app/assets/javascripts/user_tabs.js.coffee @@ -122,7 +122,9 @@ class @UserTabs setCurrentAction: (action) -> # Remove possible actions from URL regExp = new RegExp('\/(' + @actions.join('|') + ')(\.html)?\/?$') - new_state = @_location.pathname.replace(regExp, '') + new_state = @_location.pathname + new_state = new_state.replace(/\/+$/, "") # remove trailing slashes + new_state = new_state.replace(regExp, '') # Append the new action if we're on a tab other than 'activity' unless action == @defaultAction |