refactor: Make var-name more verbose
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
This commit is contained in:
parent
634c0e6e09
commit
5c6a3eff4e
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue