Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3372395
D7719.id26081.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
903 B
Referenced Files
None
Subscribers
None
D7719.id26081.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D7719: [lib] Fix crash when logged out with sidebar open
Attached
Detach File
Event Timeline
Log In to Comment