Unverified Commit 4388b2ac authored by Diego Mello's avatar Diego Mello Committed by GitHub
Browse files

[FIX] Try/catch JSON.parse XHR response (#1238)

parent 1c22cc2f
......@@ -112,8 +112,12 @@ export function sendFileMessage(rid, fileInfo, tmid, server, user) {
} catch (e) {
log(e);
}
const response = JSON.parse(xhr.response);
reject(response);
try {
const response = JSON.parse(xhr.response);
reject(response);
} catch (e) {
reject(e);
}
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment