Skip to content

Conversation

@RohitKumar-200
Copy link
Contributor

@RohitKumar-200 RohitKumar-200 commented Oct 9, 2020

Proposed changes

Fixed[#15856] , added optional chaining to indexOf('admin') in userIsAdmin to fix TypeError: Cannot read property 'indexOf' of undefined

Issue(s)

Closes #15856

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Hotfix (a major bugfix that has to be merged asap)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Changelog

Further comments

@ggazzo ggazzo changed the title [FIXED] TypeError: Cannot read property 'indexOf' of undefined [FIX] Exception while invoking method 'deleteUser' TypeError Oct 13, 2020
@ggazzo ggazzo added this to the 3.8.0 milestone Oct 13, 2020
@sampaiodiego sampaiodiego changed the title [FIX] Exception while invoking method 'deleteUser' TypeError [FIX] Error preventing from removing users without a role Oct 14, 2020
@sampaiodiego sampaiodiego merged commit d9f1b00 into RocketChat:develop Oct 14, 2020
@sampaiodiego sampaiodiego mentioned this pull request Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception while invoking method 'deleteUser' TypeError: Cannot read property 'indexOf' of undefined

3 participants