diff options
author | Phil Hughes <me@iamphill.com> | 2018-11-09 19:48:41 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-11-14 19:16:46 +0000 |
commit | 234563ba30d759870cb33d479116becb85e06eca (patch) | |
tree | fc9f553066f2d6a9ba8be7af20b181866750d246 /app/assets/javascripts/diffs/index.js | |
parent | 63b4b4b2688fa4f068772026536b2250bce39070 (diff) | |
download | gitlab-ce-234563ba30d759870cb33d479116becb85e06eca.tar.gz |
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.js | 5 |
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: { |