Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
mishig25 committed Oct 16, 2023
1 parent 2730c9c commit 3ba2298
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/src/lib/components/InferenceWidget/shared/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export function getWidgetExample<TWidgetExample extends WidgetExample>(
model: ModelData,
validateExample: (sample: WidgetExample) => sample is TWidgetExample
): TWidgetExample | undefined {
const validExamples = model.widgetData?.filter((sample): sample is TWidgetExample => sample && validateExample(sample));
const validExamples = model.widgetData?.filter(
(sample): sample is TWidgetExample => sample && validateExample(sample)
);
return validExamples?.length ? randomItem(validExamples) : undefined;
}

Expand Down

0 comments on commit 3ba2298

Please sign in to comment.