Merge branch 'rename-repo-enabled' into 'master'
Updates for proper obj notation. See merge request !13430
This commit is contained in:
commit
45c8c17e80
2 changed files with 6 additions and 10 deletions
|
@ -414,7 +414,7 @@ import initChangesDropdown from './init_changes_dropdown';
|
|||
case 'projects:tree:show':
|
||||
shortcut_handler = new ShortcutsNavigation();
|
||||
|
||||
if (UserFeatureHelper.isNewRepo()) break;
|
||||
if (UserFeatureHelper.isNewRepoEnabled()) break;
|
||||
|
||||
new TreeView();
|
||||
new BlobViewer();
|
||||
|
@ -434,7 +434,7 @@ import initChangesDropdown from './init_changes_dropdown';
|
|||
shortcut_handler = true;
|
||||
break;
|
||||
case 'projects:blob:show':
|
||||
if (UserFeatureHelper.isNewRepo()) break;
|
||||
if (UserFeatureHelper.isNewRepoEnabled()) break;
|
||||
new BlobViewer();
|
||||
initBlob();
|
||||
break;
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
import Cookies from 'js-cookie';
|
||||
|
||||
function isNewRepo() {
|
||||
return Cookies.get('new_repo') === 'true';
|
||||
}
|
||||
|
||||
const UserFeatureHelper = {
|
||||
isNewRepo,
|
||||
export default {
|
||||
isNewRepoEnabled() {
|
||||
return Cookies.get('new_repo') === 'true';
|
||||
},
|
||||
};
|
||||
|
||||
export default UserFeatureHelper;
|
||||
|
|
Loading…
Reference in a new issue