Skip to content

Commit

Permalink
Fix drug details not showing on the item page.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeKleineKobini committed Nov 24, 2024
1 parent f9b05f1 commit a0ec1bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion extension/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
],
"fixes": [
{ "message": "Fix personal stat average injection on Firefox.", "contributor": "tiksan" },
{ "message": "Fix jail score filter not working properly anymore.", "contributor": "DeKleineKobini" }
{ "message": "Fix jail score filter not working properly anymore.", "contributor": "DeKleineKobini" },
{ "message": "Fix drug details not showing on the item page.", "contributor": "DeKleineKobini" }
],
"changes": [
{
Expand Down
12 changes: 6 additions & 6 deletions extension/scripts/features/drug-details/ttDrugDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@
const details = DRUG_INFORMATION[id];
if (!details) return;

for (const info of [element.find(".info-msg"), document.find(`.info-wrap[aria-labelledby="armory-info-${id}-"] .info-msg`)]) {
if (!info) continue;

show(info, details);
if (options.changeListener) watchChanges(element, details);
}
[element.find(".info-msg, [class*='description___']"), document.find(`.info-wrap[aria-labelledby="armory-info-${id}-"] .info-msg`)]
.filter((info) => !!info)
.forEach((info) => {
show(info, details);
if (options.changeListener) watchChanges(element, details);
});

function findElement() {
return (
Expand Down

0 comments on commit a0ec1bc

Please sign in to comment.