fix: call onLoaded if specs are not found

This commit is contained in:
Alex Varchuk 2022-10-11 15:10:29 +03:00
parent 53c4f36fad
commit ad390b2faa
No known key found for this signature in database
GPG Key ID: F1FD9569DC4AED04

View File

@ -48,6 +48,9 @@ export function StoreBuilder(props: StoreBuilderProps) {
const resolved = await loadAndBundleSpec(spec || specUrl!);
setResolvedSpec(resolved);
} catch (e) {
if (onLoaded) {
onLoaded(e);
}
setError(e);
throw e;
}