Return null instead of undefined on failure
This commit is contained in:
parent
0fc79a4a0d
commit
faf517419f
1 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ class FlairStore extends EventEmitter {
|
||||||
await this._groupProfilesPromise[groupId];
|
await this._groupProfilesPromise[groupId];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Don't log the error; this is done below
|
// Don't log the error; this is done below
|
||||||
return undefined;
|
return null;
|
||||||
}
|
}
|
||||||
return this._groupProfiles[groupId];
|
return this._groupProfiles[groupId];
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ class FlairStore extends EventEmitter {
|
||||||
console.log('FlairStore: Failed to get group profile for ' + groupId, e);
|
console.log('FlairStore: Failed to get group profile for ' + groupId, e);
|
||||||
// Don't retry, but allow a retry when the profile is next requested
|
// Don't retry, but allow a retry when the profile is next requested
|
||||||
delete this._groupProfilesPromise[groupId];
|
delete this._groupProfilesPromise[groupId];
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._groupProfiles[groupId] = {
|
this._groupProfiles[groupId] = {
|
||||||
|
|
Loading…
Reference in a new issue