Skip to content

[FIX] Fixing rooms find by type and name#11451

Merged
ggazzo merged 4 commits intoRocketChat:developfrom
hmagarotto:fix_get_room_by_type_and_name
Feb 7, 2019
Merged

[FIX] Fixing rooms find by type and name#11451
ggazzo merged 4 commits intoRocketChat:developfrom
hmagarotto:fix_get_room_by_type_and_name

Conversation

@hmagarotto
Copy link
Contributor

@hmagarotto hmagarotto commented Jul 13, 2018

Small fix to standardize the 'room' variable type inside 'getRoomByTypeAndName'.

Before, room is attributed with a Room object or an array of Room. When it's a Room object and an attempt to access the index 0 occurs, the room is set to undefined and the following exception is raised on line 100:

Exception while invoking method 'getRoomByTypeAndName' TypeError: Cannot read property '_id' of undefined

@ggazzo ggazzo added this to the 0.75.0 milestone Feb 5, 2019
@ggazzo ggazzo self-assigned this Feb 5, 2019
@ggazzo ggazzo merged commit 5842d7e into RocketChat:develop Feb 7, 2019
@hmagarotto hmagarotto deleted the fix_get_room_by_type_and_name branch February 7, 2019 18:37
Montel pushed a commit to Montel/Rocket.Chat that referenced this pull request Feb 13, 2019
* Fixing getRoomByTypeAndName

* Update room.js

* Update Rooms.js
@rodrigok rodrigok mentioned this pull request Apr 28, 2019
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.

2 participants

Comments