Skip to content

Commit

Permalink
correctly remove spinner, add aborted message
Browse files Browse the repository at this point in the history
  • Loading branch information
nvms committed Aug 18, 2023
1 parent dc6dc65 commit a093498
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions media/secondary.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,13 @@ function responseAborted() {
$("#abort").addClass("hidden");
$("#repeat-last").removeClass("hidden");
const div = $(`#ai-${responseId}`);
formatDiv(div[0], message.value.text);
const responseContainer = div[0].querySelector(".response-container");
formatDiv(responseContainer, `${responseContainer.innerHTML}\n\n*This request was aborted*`);
responseId++;
$("#input").prop("disabled", false).focus();

const spinner = div[0].querySelector("#spinner");

if (spinner) {
spinner.remove();
}
if (spinner) spinner.remove();

scrollToBottom();
}
Expand Down

0 comments on commit a093498

Please sign in to comment.