Skip to content

Commit

Permalink
fixes #771 - Clear previous response text before fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
mrin9 committed Jun 11, 2022
1 parent 24bb465 commit 6caf362
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/api-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,8 @@ export default class ApiRequest extends LitElement {
let respText;
tryBtnEl.disabled = true;
const startTime = performance.now();
this.responseText = '⌛';
this.requestUpdate();
fetchResponse = await fetch(fetchRequest, { signal });
const endTime = performance.now();
responseClone = fetchResponse.clone(); // create a response clone to allow reading response body again (response.json, response.text etc)
Expand Down

0 comments on commit 6caf362

Please sign in to comment.