refactor: Make var-name more verbose

Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
This commit is contained in:
Tim Hårek Andreassen 2024-04-08 17:17:26 +02:00
parent 634c0e6e09
commit 5c6a3eff4e
No known key found for this signature in database
GPG Key ID: E59C7734F0E10EB5
1 changed files with 2 additions and 2 deletions

View File

@ -37,13 +37,13 @@ async function updateFetch(existingSeries: Series): Promise<UpdatedSeries | null
* we should not make assumptions about the order, * we should not make assumptions about the order,
* but rather sort the episode to what we want. * but rather sort the episode to what we want.
*/ */
const episodesSorted = [...newEpisodes, ...existingSeries.episodes] const episodesSortedDescending = [...newEpisodes, ...existingSeries.episodes]
.sort((a, b) => a.date.getTime() > b.date.getTime() ? -1 : 1); .sort((a, b) => a.date.getTime() > b.date.getTime() ? -1 : 1);
const updated = { const updated = {
...existingSeries, ...existingSeries,
lastFetch: new Date(), lastFetch: new Date(),
episodes: episodesSorted, episodes: episodesSortedDescending,
}; };
const updateSuccessful = await storage.write(updated); const updateSuccessful = await storage.write(updated);