Skip to content

Commit

Permalink
Only generate alttext if sidebar is open
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Lanza committed Sep 24, 2024
1 parent a6deab8 commit af1f8a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/upset/src/components/AltTextSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const AltTextSidebar: FC<Props> = ({ open, close, generateAltText }) => {
}
}

generate();
if (open) generate();
}, [currState]);

/**
Expand Down

0 comments on commit af1f8a7

Please sign in to comment.