Skip to content

Commit

Permalink
[hotfix] fix bug where Deactivated org component was trying to displa…
Browse files Browse the repository at this point in the history
…y when !currentOrg
  • Loading branch information
kaptron committed Jan 24, 2019
1 parent 902334e commit e0c5526
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/stores/ApiStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ApiStore extends jsonapi(datxCollection) {
get currentOrgIsDeactivated() {
const org =
this.currentUserOrganization || this.currentUser.current_organization
if (!org) return true
if (!org) return false
return org.deactivated
}

Expand Down
1 change: 1 addition & 0 deletions app/javascript/ui/layout/Deactivated.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Deactivated extends React.Component {
const {
apiStore: { currentUserOrganization: organization },
} = this.props
if (!organization) return ''
return (
<PageContainer>
<Wrapper>
Expand Down
1 change: 1 addition & 0 deletions app/javascript/ui/roles/RolesMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class RolesMenu extends React.Component {

this.setState(prevState => ({
groups,
pendingPanelOpen: counts.active === 0 && counts.pending > 0,
page: {
pending:
status === 'pending' || status === 'both'
Expand Down

0 comments on commit e0c5526

Please sign in to comment.