Commit 3b3aa28c authored by Phil Hughes's avatar Phil Hughes

Use convertPermissionToBoolean to get a boolean

parent b07a0167
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { TooltipDirective as Tooltip } from '@gitlab-org/gitlab-ui'; import { TooltipDirective as Tooltip } from '@gitlab-org/gitlab-ui';
import { convertPermissionToBoolean } from '~/lib/utils/common_utils';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import FileRow from '~/vue_shared/components/file_row.vue'; import FileRow from '~/vue_shared/components/file_row.vue';
import FileRowStats from './file_row_stats.vue'; import FileRowStats from './file_row_stats.vue';
...@@ -17,10 +18,12 @@ export default { ...@@ -17,10 +18,12 @@ export default {
}, },
data() { data() {
const treeListStored = localStorage.getItem(treeListStorageKey); const treeListStored = localStorage.getItem(treeListStorageKey);
const renderTreeList = treeListStored !== null ?
convertPermissionToBoolean(treeListStored) : true;
return { return {
search: '', search: '',
renderTreeList: treeListStored !== null ? treeListStored === 'true' : true, renderTreeList,
focusSearch: false, focusSearch: false,
}; };
}, },
......
...@@ -74,7 +74,9 @@ export default { ...@@ -74,7 +74,9 @@ export default {
outputText() { outputText() {
const text = this.file[this.displayTextKey]; const text = this.file[this.displayTextKey];
if (this.truncateStart === 0) return text; if (this.truncateStart === 0) {
return text;
}
return `...${text.substring(this.truncateStart, text.length)}`; return `...${text.substring(this.truncateStart, text.length)}`;
}, },
......
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