Use convertPermissionToBoolean to get a boolean
This commit is contained in:
parent
b07a0167d0
commit
3b3aa28c4c
|
@ -1,6 +1,7 @@
|
|||
<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)}`;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue