summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-08-18 07:34:26 +0000
committerPhil Hughes <me@iamphill.com>2017-08-18 07:34:26 +0000
commit45c8c17e8034c7a284811caf75029a5809170a77 (patch)
tree8a21274f1eee1ded866b4196e719615636f734bb
parent8fadba44f4b0c686e79d32fe196ab0abe33d3df2 (diff)
parent53a7fde9318621c287888974980a87401392cba4 (diff)
downloadgitlab-ce-45c8c17e8034c7a284811caf75029a5809170a77.tar.gz
Merge branch 'rename-repo-enabled' into 'master'
Updates for proper obj notation. See merge request !13430
-rw-r--r--app/assets/javascripts/dispatcher.js4
-rw-r--r--app/assets/javascripts/helpers/user_feature_helper.js12
2 files changed, 6 insertions, 10 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index a0ed5c23ffe..2bba7f55de1 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -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;
diff --git a/app/assets/javascripts/helpers/user_feature_helper.js b/app/assets/javascripts/helpers/user_feature_helper.js
index fcd8569819c..638118a5204 100644
--- a/app/assets/javascripts/helpers/user_feature_helper.js
+++ b/app/assets/javascripts/helpers/user_feature_helper.js
@@ -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;