Appease the linter

This commit is contained in:
Travis Ralston 2020-08-19 19:42:36 -06:00
parent 309c32700b
commit 8fffce8a30

View file

@ -108,11 +108,12 @@ export async function leaveRoomBehaviour(roomId: string) {
const errors = Object.entries(results).filter(r => !!r[1]); const errors = Object.entries(results).filter(r => !!r[1]);
if (errors.length > 0) { if (errors.length > 0) {
let messages = []; const messages = [];
for (const err of errors) { for (const roomErr of errors) {
const err = roomErr[1]; // [0] is the roomId
let message = _t("Unexpected server error trying to leave the room"); let message = _t("Unexpected server error trying to leave the room");
if (results[roomId].errcode && results[roomId].message) { if (err.errcode && err.message) {
if (results[roomId].errcode === 'M_CANNOT_LEAVE_SERVER_NOTICE_ROOM') { if (err.errcode === 'M_CANNOT_LEAVE_SERVER_NOTICE_ROOM') {
Modal.createTrackedDialog('Error Leaving Room', '', ErrorDialog, { Modal.createTrackedDialog('Error Leaving Room', '', ErrorDialog, {
title: _t("Can't leave Server Notices room"), title: _t("Can't leave Server Notices room"),
description: _t( description: _t(