fix: do not crash on empty scopes

fixes #1044
This commit is contained in:
Roman Hotsiy 2019-09-30 11:05:09 +03:00
parent 9f0694c10f
commit e787d9e276
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -49,7 +49,7 @@ export class OAuthFlow extends React.PureComponent<OAuthFlowProps> {
<strong> Scopes: </strong> <strong> Scopes: </strong>
</div> </div>
<ul> <ul>
{Object.keys(flow!.scopes).map(scope => ( {Object.keys(flow!.scopes || {}).map(scope => (
<li key={scope}> <li key={scope}>
<code>{scope}</code> - <Markdown inline={true} source={flow!.scopes[scope] || ''} /> <code>{scope}</code> - <Markdown inline={true} source={flow!.scopes[scope] || ''} />
</li> </li>