mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
web: Do not assume error responses are valid, or our, JSON.
Partially fixes #24815.
This commit is contained in:
committed by
Tim Abbott
parent
7efe989a72
commit
ba7492a314
@@ -280,8 +280,7 @@ function create_stream() {
|
||||
// The rest of the work is done via the subscribe event we will get
|
||||
},
|
||||
error(xhr) {
|
||||
const msg = xhr.responseJSON.msg;
|
||||
if (msg.includes("access")) {
|
||||
if (xhr.responseJSON?.msg?.includes("access")) {
|
||||
// If we can't access the stream, we can safely
|
||||
// assume it's a duplicate stream that we are not invited to.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user