Skip to content

Commit

Permalink
fix(ui): spandrel filter infinite loop when no models installed
Browse files Browse the repository at this point in the history
Closes #6835
  • Loading branch information
psychedelicious committed Sep 12, 2024
1 parent 2622f7d commit 6bea72a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ export const FilterSpandrel = ({ onChange, config }: Props) => {
);

useEffect(() => {
if (!config.model) {
onChangeModel(options[0] ?? null);
const firstModel = options[0];
if (!config.model && firstModel) {
onChangeModel(firstModel);
}
}, [config.model, onChangeModel, options]);

Expand Down

0 comments on commit 6bea72a

Please sign in to comment.