[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) {
|
} catch (e) {
|
||||||
log(e);
|
log(e);
|
||||||
}
|
}
|
||||||
const response = JSON.parse(xhr.response);
|
try {
|
||||||
reject(response);
|
const response = JSON.parse(xhr.response);
|
||||||
|
reject(response);
|
||||||
|
} catch (e) {
|
||||||
|
reject(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue