Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3379624
D3732.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
797 B
Referenced Files
None
Subscribers
None
D3732.diff
View Options
diff --git a/lib/hooks/relationship-prompt.js b/lib/hooks/relationship-prompt.js
--- a/lib/hooks/relationship-prompt.js
+++ b/lib/hooks/relationship-prompt.js
@@ -49,7 +49,7 @@
const updateRelationship = React.useCallback(
async (action: RelationshipAction) => {
try {
- invariant(otherUserInfo, 'Other user info should be present');
+ invariant(otherUserInfo?.id, 'Other user info id should be present');
return await callUpdateRelationships({
action,
userIDs: [otherUserInfo.id],
@@ -59,7 +59,7 @@
throw e;
}
},
- [callUpdateRelationships, onErrorCallback, otherUserInfo],
+ [callUpdateRelationships, onErrorCallback, otherUserInfo?.id],
);
const dispatchActionPromise = useDispatchActionPromise();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 5:42 PM (19 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594539
Default Alt Text
D3732.diff (797 B)
Attached To
Mode
D3732: [lib] Make relationship update function dependent on user id
Attached
Detach File
Event Timeline
Log In to Comment