From faf517419ff13691928653e9d8a23dc07d1fbdbe Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 6 Mar 2018 12:14:41 +0000 Subject: [PATCH] Return null instead of undefined on failure --- src/stores/FlairStore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/FlairStore.js b/src/stores/FlairStore.js index 36b284664a..c8b4d75010 100644 --- a/src/stores/FlairStore.js +++ b/src/stores/FlairStore.js @@ -160,7 +160,7 @@ class FlairStore extends EventEmitter { await this._groupProfilesPromise[groupId]; } catch (e) { // Don't log the error; this is done below - return undefined; + return null; } return this._groupProfiles[groupId]; } @@ -176,7 +176,7 @@ class FlairStore extends EventEmitter { console.log('FlairStore: Failed to get group profile for ' + groupId, e); // Don't retry, but allow a retry when the profile is next requested delete this._groupProfilesPromise[groupId]; - return; + return null; } this._groupProfiles[groupId] = {