Fix removing the name of the room

The name of the room is removed by setting it to the empty string, but
the if condition was wrong and thus an empty string did not satisfy it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2017-12-07 18:08:06 +01:00
Родитель c86300f65e
Коммит 7014a4d2ad
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -67,7 +67,7 @@
// Moreover, the endpoint to rename a room expects the name to be
// provided in a "roomName" attribute instead of a "name"
// attribute, so that has to be changed too.
if (method === 'patch' && options.attrs.name) {
if (method === 'patch' && options.attrs.name !== undefined) {
method = 'update';
options.attrs.roomName = options.attrs.name;