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

Updates for proper obj notation.

See merge request !13430
This commit is contained in:
Phil Hughes 2017-08-18 07:34:26 +00:00
commit 45c8c17e80
2 changed files with 6 additions and 10 deletions

View file

@ -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';
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;

View file

@ -1,11 +1,7 @@
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;