Skip to content

Commit

Permalink
Merge pull request #98 from ether/fix/lint
Browse files Browse the repository at this point in the history
Fixed linter errors.
  • Loading branch information
SamTV12345 authored Aug 4, 2023
2 parents 09dbb5c + 7861dfa commit bd91025
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const search = async (query) => {
query,
total: padIDs.length,
};
let maxResult = 0;
let maxResult;
let result = padIDs;
if (query.pattern != null && query.pattern !== '') {
let pattern = `*${query.pattern}*`;
Expand Down Expand Up @@ -55,9 +55,7 @@ const search = async (query) => {
entry.lastEdited = await pad.getLastEdit();
}));

const sorted = data.results.sort(function(a, b) {
return a.lastEdited - b.lastEdited;
});
const sorted = data.results.sort((a, b) => a.lastEdited - b.lastEdited);
data.results = sorted.slice(query.offset, query.offset + query.limit);

return data;
Expand Down

0 comments on commit bd91025

Please sign in to comment.