Skip to content

Commit

Permalink
fix: call onLoaded if specs are not found (#2182)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVarchuk authored Oct 21, 2022
1 parent 187e555 commit 0753bbe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/StoreBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0753bbe

Please sign in to comment.