Page MenuHomePhabricator

D7719.id26081.diff
No OneTemporary

D7719.id26081.diff

diff --git a/lib/shared/mention-utils.js b/lib/shared/mention-utils.js
--- a/lib/shared/mention-utils.js
+++ b/lib/shared/mention-utils.js
@@ -1,7 +1,5 @@
// @flow
-import invariant from 'invariant';
-
import { oldValidUsernameRegexString } from './account-utils.js';
import SearchIndex from './search-index.js';
import { threadOtherMembers } from './thread-utils.js';
@@ -102,8 +100,13 @@
if (threadInfo.type !== threadTypes.SIDEBAR) {
return threadInfo.members;
}
- invariant(parentThreadInfo, 'sidebars should have parents');
- return parentThreadInfo.members;
+ if (parentThreadInfo) {
+ return parentThreadInfo.members;
+ }
+ // This scenario should not occur unless the user logs out while looking at a
+ // sidebar. In that scenario, the Redux store may be cleared before ReactNav
+ // finishes transitioning away from the previous screen
+ return [];
}
export {

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 6:26 AM (22 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2589150
Default Alt Text
D7719.id26081.diff (903 B)

Event Timeline