Skip to content

Commit

Permalink
clean up removableMembers
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Jan 17, 2023
1 parent dcf6a1d commit 5be2153
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,8 @@ class WorkspaceMembersPage extends React.Component {

render() {
const policyMemberList = lodashGet(this.props, 'policyMemberList', {});
const removableMembers = [];
let data = [];
_.each(policyMemberList, (policyMember, email) => {
if (email !== this.props.session.email && email !== this.props.policy.owner && policyMember.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) {
removableMembers.push(email);
}
const details = lodashGet(this.props.personalDetails, email, {displayName: email, login: email, avatar: Expensicons.FallbackAvatar});
data.push({
...policyMember,
Expand Down Expand Up @@ -321,7 +317,7 @@ class WorkspaceMembersPage extends React.Component {
<View style={[styles.peopleRow, styles.ph5, styles.pb3]}>
<View style={[styles.peopleRowCell]}>
<Checkbox
isChecked={this.state.selectedEmployees.length === removableMembers.length && removableMembers.length !== 0}
isChecked={this.state.selectedEmployees.length === policyMemberList.length && policyMemberList.length !== 0}
onPress={() => this.toggleAllUsers()}
/>
</View>
Expand Down

0 comments on commit 5be2153

Please sign in to comment.