fixed eslint
This commit is contained in:
parent
cacc8f40a5
commit
066aa5b30e
2 changed files with 10 additions and 9 deletions
|
@ -24,8 +24,7 @@ export default {
|
|||
filteredBlobs() {
|
||||
const searchText = this.searchText.trim();
|
||||
|
||||
if (searchText === '')
|
||||
return this.allBlobs.sort((a, b) => b.lastOpenedAt - a.lastOpenedAt).slice(0, MAX_RESULTS);
|
||||
if (searchText === '') return this.allBlobs.slice(0, MAX_RESULTS);
|
||||
|
||||
return fuzzaldrinPlus.filter(this.allBlobs, searchText, {
|
||||
key: 'path',
|
||||
|
|
|
@ -37,12 +37,14 @@ export const hasChanges = state => !!state.changedFiles.length;
|
|||
export const hasMergeRequest = state => !!state.currentMergeRequestId;
|
||||
|
||||
export const allBlobs = state =>
|
||||
Object.keys(state.entries).reduce((acc, key) => {
|
||||
const entry = state.entries[key];
|
||||
Object.keys(state.entries)
|
||||
.reduce((acc, key) => {
|
||||
const entry = state.entries[key];
|
||||
|
||||
if (entry.type === 'blob') {
|
||||
acc.push(entry);
|
||||
}
|
||||
if (entry.type === 'blob') {
|
||||
acc.push(entry);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, []);
|
||||
return acc;
|
||||
}, [])
|
||||
.sort((a, b) => b.lastOpenedAt - a.lastOpenedAt);
|
||||
|
|
Loading…
Reference in a new issue