Less tricks, moar clarity

This commit is contained in:
Markus Olsson 2020-12-22 14:11:27 +01:00
parent 6e4ab3511f
commit ecae3c41d8

View file

@ -113,7 +113,10 @@ export class AheadBehindStore {
log.error('Failed calculating ahead/behind status', e)
return null
})
.then(aheadBehind => this.cache.set(key, aheadBehind) && aheadBehind)
.then(aheadBehind => {
this.cache.set(key, aheadBehind)
return aheadBehind
})
.finally(() => this.workers.delete(key))
this.workers.set(key, worker)