mirror of
https://github.com/desktop/desktop
synced 2024-09-18 07:32:01 +00:00
Less tricks, more clarity
This commit is contained in:
parent
83483a1872
commit
6e4ab3511f
|
@ -119,7 +119,11 @@ export class AheadBehindStore {
|
|||
this.workers.set(key, worker)
|
||||
}
|
||||
|
||||
return worker.then(x => x !== null && !disposable.disposed && callback(x))
|
||||
const aheadBehind = await worker
|
||||
|
||||
if (aheadBehind !== null && !disposable.disposed) {
|
||||
callback(aheadBehind)
|
||||
}
|
||||
}).catch(e => log.error('Failed calculating ahead/behind status', e))
|
||||
|
||||
return disposable
|
||||
|
|
Loading…
Reference in a new issue