Skip to content

Commit

Permalink
Avoid an error on the enemy page when switching pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeKleineKobini committed Jan 8, 2025
1 parent 882067c commit 0aec4f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extension/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"contributor": "DeKleineKobini"
},
{ "message": "Improved performance while using FF Scouter in some cases.", "contributor": "DeKleineKobini" },
{ "message": "Route tornpal requests through the background to bypass Torn's CSP policy on Firefox.", "contributor": "DeKleineKobini" }
{ "message": "Route tornpal requests through the background to bypass Torn's CSP policy on Firefox.", "contributor": "DeKleineKobini" },
{ "message": "Avoid an error on the enemy page when switching pages.", "contributor": "DeKleineKobini" }
],
"changes": [{ "message": "Better optimize calls to tornpal.", "contributor": "DeKleineKobini" }],
"removed": []
Expand Down
2 changes: 2 additions & 0 deletions extension/scripts/features/enemy-filter/ttEnemyFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
if (!feature.enabled()) return;

const content = findContainer("Enemy Filter", { selector: "main" });
if (!content) return;

const statsEstimates = localFilters["Stats Estimate"]?.getSelections(content);
if (!statsEstimates?.length) return;

Expand Down

0 comments on commit 0aec4f9

Please sign in to comment.