summaryrefslogtreecommitdiffstats
path: root/webapp/client
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-11-22 13:23:48 -0300
committerCorey Hulen <corey@hulen.com>2016-11-22 08:23:48 -0800
commit1a134efc6540c3dfff41afc56d7925c994e031d8 (patch)
tree6db36ce6d13832c6e0f00f66f280a31403746802 /webapp/client
parente1fca412fc9c1f98f1682052fa8ce52166181a44 (diff)
downloadchat-1a134efc6540c3dfff41afc56d7925c994e031d8.tar.gz
chat-1a134efc6540c3dfff41afc56d7925c994e031d8.tar.bz2
chat-1a134efc6540c3dfff41afc56d7925c994e031d8.zip
PLT-4635 Fix Cannot read property 'body' of undefined (#4629)
* Fix Cannot read property 'body' of undefined * return if an error was found
Diffstat (limited to 'webapp/client')
-rw-r--r--webapp/client/client.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index 092c2da4a..a7d7a5c8a 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -201,12 +201,12 @@ export default class Client {
if (errorCallback) {
errorCallback(e, err, res);
- return;
}
+ return;
}
if (successCallback) {
- if (res.body) {
+ if (res && res.body) {
successCallback(res.body, res);
} else {
console.error('Missing response body for ' + methodName); // eslint-disable-line no-console