mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 08:36:33 +03:00
fix: handle error if security scopes is invalid (#2113)
This commit is contained in:
parent
cf4642e303
commit
428fd6983d
|
@ -92,7 +92,7 @@ function getRequiredScopes(id: string, securities: SecurityRequirementModel[]):
|
||||||
let schemesLength = security.schemes.length;
|
let schemesLength = security.schemes.length;
|
||||||
while (schemesLength--) {
|
while (schemesLength--) {
|
||||||
const scheme = security.schemes[schemesLength];
|
const scheme = security.schemes[schemesLength];
|
||||||
if (scheme.id === id) {
|
if (scheme.id === id && Array.isArray(scheme.scopes)) {
|
||||||
allScopes.push(...scheme.scopes);
|
allScopes.push(...scheme.scopes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user