diff options
-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 |