Commit 066aa5b3 authored by Phil Hughes's avatar Phil Hughes

fixed eslint

parent cacc8f40
......@@ -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);
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