[FIX] Try/catch JSON.parse XHR response (#1238)
This commit is contained in:
parent
1c22cc2f9f
commit
4388b2acb1
|
@ -112,8 +112,12 @@ export function sendFileMessage(rid, fileInfo, tmid, server, user) {
|
|||
} catch (e) {
|
||||
log(e);
|
||||
}
|
||||
try {
|
||||
const response = JSON.parse(xhr.response);
|
||||
reject(response);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue