Commit 41c23f76 authored by Matthew Taylor's avatar Matthew Taylor

Get rid of superfluous checks

thanks @rschamp!
parent e85563c9
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment