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'; ...@@ -408,7 +408,7 @@ import UserFeatureHelper from './helpers/user_feature_helper';
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();
...@@ -428,7 +428,7 @@ import UserFeatureHelper from './helpers/user_feature_helper'; ...@@ -428,7 +428,7 @@ import UserFeatureHelper from './helpers/user_feature_helper';
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 {
return Cookies.get('new_repo') === 'true'; isNewRepoEnabled() {
} 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