Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-11-09 22:48:41 +0300
committerPhil Hughes <me@iamphill.com>2018-11-14 22:16:46 +0300
commit234563ba30d759870cb33d479116becb85e06eca (patch)
treefc9f553066f2d6a9ba8be7af20b181866750d246 /app/assets/javascripts/diffs/index.js
parent63b4b4b2688fa4f068772026536b2250bce39070 (diff)
Made diff & note data consistent
This caused many pain points when working with it. Part of the data was camel cased the other snake case. Other parts where snake case & then getting converted in components, this conversion has the potential for leaking memory. This changes that & makes it consistent with what it returned from the API, snake case.
Diffstat (limited to 'app/assets/javascripts/diffs/index.js')
-rw-r--r--app/assets/javascripts/diffs/index.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/assets/javascripts/diffs/index.js b/app/assets/javascripts/diffs/index.js
index aae89109c27..06ef4207d85 100644
--- a/app/assets/javascripts/diffs/index.js
+++ b/app/assets/javascripts/diffs/index.js
@@ -1,6 +1,5 @@
import Vue from 'vue';
import { mapState } from 'vuex';
-import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import diffsApp from './components/app.vue';
export default function initDiffsApp(store) {
@@ -17,9 +16,7 @@ export default function initDiffsApp(store) {
return {
endpoint: dataset.endpoint,
projectPath: dataset.projectPath,
- currentUser: convertObjectPropsToCamelCase(JSON.parse(dataset.currentUserData), {
- deep: true,
- }),
+ currentUser: JSON.parse(dataset.currentUserData) || {},
};
},
computed: {