Skip to content

Commit

Permalink
wishlist: check for rating and skip before getting rating
Browse files Browse the repository at this point in the history
  • Loading branch information
tryton-vanmeer committed Nov 15, 2023
1 parent c0cf001 commit f38107e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/wishlist.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"use strict";

async function insertRating(row) {
const appid = row.getAttribute("data-app-id");
const rating = await getRatingElement(appid);

const statsContainer = row.querySelector(".stats");

if (statsContainer.querySelector(".protondb_rating_link")) {
return true;
}

const appid = row.getAttribute("data-app-id");
const rating = await getRatingElement(appid);

const label = document.createElement("div");
const value = document.createElement("div");

Expand All @@ -27,7 +27,7 @@ function insertRatings() {
const rows = document.getElementById("wishlist_ctn");

for (const row of rows.getElementsByClassName("wishlist_row")) {
insertRating(row)
insertRating(row);
}

setTimeout(insertRatings, 1000);
Expand Down

0 comments on commit f38107e

Please sign in to comment.