Commit 53a7fde9 authored by Mike Greiling's avatar Mike Greiling

use proper object notation and rename isNewRepo to isNewRepoEnabled

parent 705dbe61
......@@ -408,7 +408,7 @@ import UserFeatureHelper from './helpers/user_feature_helper';
case 'projects:tree:show':
shortcut_handler = new ShortcutsNavigation();
if (UserFeatureHelper.isNewRepo()) break;
if (UserFeatureHelper.isNewRepoEnabled()) break;
new TreeView();
new BlobViewer();
......@@ -428,7 +428,7 @@ import UserFeatureHelper from './helpers/user_feature_helper';
shortcut_handler = true;
break;
case 'projects:blob:show':
if (UserFeatureHelper.isNewRepo()) break;
if (UserFeatureHelper.isNewRepoEnabled()) break;
new BlobViewer();
initBlob();
break;
......
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;
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