mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-02 19:30:19 +03:00
fix: call onLoaded if specs are not found
This commit is contained in:
parent
53c4f36fad
commit
ad390b2faa
|
@ -48,6 +48,9 @@ export function StoreBuilder(props: StoreBuilderProps) {
|
||||||
const resolved = await loadAndBundleSpec(spec || specUrl!);
|
const resolved = await loadAndBundleSpec(spec || specUrl!);
|
||||||
setResolvedSpec(resolved);
|
setResolvedSpec(resolved);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (onLoaded) {
|
||||||
|
onLoaded(e);
|
||||||
|
}
|
||||||
setError(e);
|
setError(e);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user