Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2456,8 +2456,6 @@ function removeFromRoom(reportID: string, targetAccountIDs: number[]) {
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
participantAccountIDs: participantAccountIDsAfterRemoval,
visibleChatMemberAccountIDs: visibleChatMemberAccountIDsAfterRemoval,
pendingChatMembers,
},
},
Expand All @@ -2468,8 +2466,6 @@ function removeFromRoom(reportID: string, targetAccountIDs: number[]) {
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
participantAccountIDs: report?.participantAccountIDs,
visibleChatMemberAccountIDs: report?.visibleChatMemberAccountIDs,
pendingChatMembers: report?.pendingChatMembers ?? null,
},
},
Expand Down
8 changes: 6 additions & 2 deletions src/libs/mapChildrenFlat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import React from 'react';
* return modifiedChild;
* });
*/
const mapChildrenFlat = <T, C>(...args: Parameters<typeof React.Children.map<T, C>>) => {
const mappedChildren = React.Children.map(...args);
const mapChildrenFlat = <T, C>(element: C, fn: (child: C, index: number) => T) => {
if (typeof element === 'function') {
return element(false) as C;
}

const mappedChildren = React.Children.map(element, fn);

if (Array.isArray(mappedChildren) && mappedChildren.length === 1) {
return mappedChildren[0];
Expand Down