1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Add a helpful comment

This commit is contained in:
Travis Ralston
2018-12-05 11:29:53 -07:00
committed by GitHub
parent 2b027b716f
commit 7e817f4aa9

View File

@@ -224,6 +224,8 @@ class RoomViewStore extends Store {
err: err, err: err,
}); });
let msg = err.message ? err.message : JSON.stringify(err); let msg = err.message ? err.message : JSON.stringify(err);
// XXX: We are relying on the error message returned by browsers here.
// This isn't great, but it does generalize the error being shown to users.
if (msg && msg.startsWith("CORS request rejected")) { if (msg && msg.startsWith("CORS request rejected")) {
msg = _t("There was an error joining the room"); msg = _t("There was an error joining the room");
} }