Commit 45c8c17e authored by Phil Hughes's avatar Phil Hughes

Merge branch 'rename-repo-enabled' into 'master'

Updates for proper obj notation.

See merge request !13430
parents 8fadba44 53a7fde9
...@@ -414,7 +414,7 @@ import initChangesDropdown from './init_changes_dropdown'; ...@@ -414,7 +414,7 @@ import initChangesDropdown from './init_changes_dropdown';
case 'projects:tree:show': case 'projects:tree:show':
shortcut_handler = new ShortcutsNavigation(); shortcut_handler = new ShortcutsNavigation();
if (UserFeatureHelper.isNewRepo()) break; if (UserFeatureHelper.isNewRepoEnabled()) break;
new TreeView(); new TreeView();
new BlobViewer(); new BlobViewer();
...@@ -434,7 +434,7 @@ import initChangesDropdown from './init_changes_dropdown'; ...@@ -434,7 +434,7 @@ import initChangesDropdown from './init_changes_dropdown';
shortcut_handler = true; shortcut_handler = true;
break; break;
case 'projects:blob:show': case 'projects:blob:show':
if (UserFeatureHelper.isNewRepo()) break; if (UserFeatureHelper.isNewRepoEnabled()) break;
new BlobViewer(); new BlobViewer();
initBlob(); initBlob();
break; break;
......
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
function isNewRepo() { export default {
isNewRepoEnabled() {
return Cookies.get('new_repo') === 'true'; return Cookies.get('new_repo') === 'true';
} },
const UserFeatureHelper = {
isNewRepo,
}; };
export default UserFeatureHelper;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment