Adjust redirect logging (apis only showsn when filled) (#4229)

This commit is contained in:
Jaco Greeff 2020-12-17 14:43:05 +01:00 committed by GitHub
parent 44d0b9fb26
commit df1732042a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ interface Props extends RouteProps {
}
function NotFound ({ basePath, missingApis = [] }: Props): React.ReactElement {
console.log(`Redirecting from route "${basePath}" to "explorer", missing the following APIs: ${JSON.stringify(missingApis)}`);
console.log(`Redirecting from route "${basePath}" to "/explorer"${missingApis.length ? `, missing the following APIs: ${JSON.stringify(missingApis)}` : ''}`);
return (
<Redirect to='/explorer' />