From 25c5111f3f5541b1116670ab550522cff8b6b694 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Fri, 16 Dec 2016 05:01:51 -0800 Subject: [PATCH] PLT_4948 fixing create team javascript error (#4809) --- webapp/client/client.jsx | 2 +- webapp/client/web_client.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx index c2db8a2759..370d40ac02 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 324d4cd25c..53e199e668 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; }