diff options
author | Phil Hughes <me@iamphill.com> | 2017-09-28 13:44:33 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-09-29 12:51:26 +0300 |
commit | 8585ae61e730a48fc0688417b24279c48b59dada (patch) | |
tree | 46362df866c55c3f902ea24596771e007bdbf897 /app/assets/javascripts/dispatcher.js | |
parent | ccfe6860079c6c75ab5a1f831cd62af0e355331e (diff) |
Fix fork button being disabled for users who can fork to group
Previously the fork button was disabled for all users if they have
exceeded their project limit. This fixes that by changing the check
to see if the user can fork to a group instead of their own namespace.
This behaviour is already possible by visiting the new fork page
directly, so this just fixes the button being disabled.
Closes #38462
Diffstat (limited to 'app/assets/javascripts/dispatcher.js')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 31214818496..bbaa4e4d91e 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -14,7 +14,6 @@ /* global NotificationsDropdown */ /* global GroupAvatar */ /* global LineHighlighter */ -/* global ProjectFork */ /* global BuildArtifacts */ /* global GroupsSelect */ /* global Search */ @@ -476,7 +475,9 @@ import { ajaxGet, convertPermissionToBoolean } from './lib/utils/common_utils'; shortcut_handler = true; break; case 'projects:forks:new': - new ProjectFork(); + import(/* webpackChunkName: 'project_fork' */ './project_fork') + .then(fork => fork.default()) + .catch(() => {}); break; case 'projects:artifacts:browse': new ShortcutsNavigation(); |