From 1a134efc6540c3dfff41afc56d7925c994e031d8 Mon Sep 17 00:00:00 2001 From: enahum Date: Tue, 22 Nov 2016 13:23:48 -0300 Subject: [PATCH] PLT-4635 Fix Cannot read property 'body' of undefined (#4629) * Fix Cannot read property 'body' of undefined * return if an error was found --- webapp/client/client.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx index 092c2da4ae..a7d7a5c8a5 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