Skip to content

Commit

Permalink
Clear about page credits before populating them (#1840)
Browse files Browse the repository at this point in the history
While working on #1835, I
noticed a bug in the "About" dialog where the list of credits keep
growing each time the dialog gets opened.

Demo of the issue:


https://github.com/user-attachments/assets/dd4cb4e9-9406-4d50-b42f-149684181d7b


This PR clears the credits before populating them.

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1840"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>
  • Loading branch information
jdeanwallace authored Aug 14, 2024
1 parent 67f1c4d commit 52417d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/templates/custom-elements/about-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ <h3>About TinyPilot</h3>
metadata.sort((a, b) => a.name.localeCompare(b.name, "en"));

const creditsDiv = this.shadowRoot.querySelector(".credits");
creditsDiv.innerHTML = "";
for (const project of metadata) {
// Skip displaying TinyPilot in the list of dependencies, since we
// display the TinyPilot license in a special way.
Expand Down

0 comments on commit 52417d7

Please sign in to comment.