Skip to content

Commit

Permalink
fixed issue of multiple times clicking retry button
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil7174 committed Oct 10, 2024
1 parent d2ea4b7 commit ea81140
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,17 @@ const TextRephraser = (() => {

const rightButton = createPillButton('rewrite', iconColor, 'Retry', () => {
if (state.prevActiveElement) {
rephraseText(textBox);
if (state.pillContainer) {
state.pillContainer.remove();
state.pillContainer = null;
}

if (state.rephraseButton) {
state.rephraseButton.style.display = 'flex';
updateButtonForFetching(textBox, img);
}

rephraseText(textBox, img);
}
});

Expand Down

0 comments on commit ea81140

Please sign in to comment.