mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-03-21 18:04:10 -05:00
Fix friends list stops updating
How?
This commit is contained in:
parent
5f0fd26ef6
commit
0e7b6e50c4
|
|
@ -93,8 +93,10 @@ export class CoralUser<T extends CoralApi = CoralApi> implements CoralUserData<T
|
|||
if ((this.updated[key] + ttl) < Date.now()) {
|
||||
const promise = this.promise.get(key) ?? callback.call(null).then(() => {
|
||||
this.updated[key] = Date.now();
|
||||
}).finally(() => {
|
||||
this.promise.delete(key);
|
||||
}).catch(err => {
|
||||
this.promise.delete(key);
|
||||
throw err;
|
||||
});
|
||||
|
||||
this.promise.set(key, promise);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user