Get rid of superfluous checks

thanks @rschamp!
This commit is contained in:
Matthew Taylor 2016-01-20 14:01:51 -05:00
parent e85563c96e
commit 41c23f76c0

View file

@ -45,7 +45,7 @@ var Api = {
// Legacy API responses come as lists, and indicate to redirect the client like
// [{success: true, redirect: "/location/to/redirect"}]
try {
if (body && body[0] && 'redirect' in body[0]) window.location = body[0].redirect;
if ('redirect' in body[0]) window.location = body[0].redirect;
} catch (err) {
// do nothing
}