summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-12-16 05:01:51 -0800
committerJoram Wilander <jwawilander@gmail.com>2016-12-16 08:01:51 -0500
commit25c5111f3f5541b1116670ab550522cff8b6b694 (patch)
treeb2b5a6494d6228c0de5b54b22bc1ac6c9fd3e089
parent2e5ae55e691e6cd6395082b5cf74e0d5f1161c05 (diff)
downloadchat-25c5111f3f5541b1116670ab550522cff8b6b694.tar.gz
chat-25c5111f3f5541b1116670ab550522cff8b6b694.tar.bz2
chat-25c5111f3f5541b1116670ab550522cff8b6b694.zip
PLT_4948 fixing create team javascript error (#4809)
-rw-r--r--webapp/client/client.jsx2
-rw-r--r--webapp/client/web_client.jsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index c2db8a275..370d40ac0 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -210,7 +210,7 @@ export default class Client {
}
if (successCallback) {
- if (res && res.body) {
+ if (res && res.body !== undefined) { // eslint-disable-line no-undefined
successCallback(res.body, res);
} else {
console.error('Missing response body for ' + methodName); // eslint-disable-line no-console
diff --git a/webapp/client/web_client.jsx b/webapp/client/web_client.jsx
index 324d4cd25..53e199e66 100644
--- a/webapp/client/web_client.jsx
+++ b/webapp/client/web_client.jsx
@@ -38,7 +38,7 @@ class WebClientClass extends Client {
}
handleError(err, res) {
- if (res.body.id === 'api.context.mfa_required.app_error') {
+ if (res && res.body && res.body.id === 'api.context.mfa_required.app_error') {
window.location.reload();
return;
}