mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-16 18:00:33 +03:00
fix: fix crash when discriminator is used incorrectly
This commit is contained in:
parent
0192b70235
commit
b1d928dbd3
|
@ -198,6 +198,7 @@ export class SpecManager {
|
|||
let definition = schema || this.byPointer(defPointer);
|
||||
if (!definition) throw new Error(`Can't load schema at ${defPointer}`);
|
||||
if (!definition.discriminator && !definition['x-extendedDiscriminator']) return [];
|
||||
if (defPointer === undefined) return [];
|
||||
|
||||
let globalDefs = this._schema.definitions || {};
|
||||
let res:DescendantInfo[] = [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user