mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Get rid of superfluous checks
thanks @rschamp!
This commit is contained in:
parent
e85563c96e
commit
41c23f76c0
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue