mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-27 13:20:23 -04: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
|
// Legacy API responses come as lists, and indicate to redirect the client like
|
||||||
// [{success: true, redirect: "/location/to/redirect"}]
|
// [{success: true, redirect: "/location/to/redirect"}]
|
||||||
try {
|
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) {
|
} catch (err) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue