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

Use convertPermissionToBoolean to get a boolean

parent b07a0167
<script>
import { mapActions, mapGetters, mapState } from 'vuex';
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 FileRow from '~/vue_shared/components/file_row.vue';
import FileRowStats from './file_row_stats.vue';
......@@ -17,10 +18,12 @@ export default {
},
data() {
const treeListStored = localStorage.getItem(treeListStorageKey);
const renderTreeList = treeListStored !== null ?
convertPermissionToBoolean(treeListStored) : true;
return {
search: '',
renderTreeList: treeListStored !== null ? treeListStored === 'true' : true,
renderTreeList,
focusSearch: false,
};
},
......
......@@ -74,7 +74,9 @@ export default {
outputText() {
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)}`;
},
......
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