Skip to content

Commit

Permalink
Fix inventory lock and hide error"
Browse files Browse the repository at this point in the history
  • Loading branch information
bradp committed May 12, 2024
1 parent eb74be4 commit 1bdd8cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 0.44.2

- Fixes Inventory Lock and Hide displaying an error

## Version 0.44.1

- Minor background fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mh-ui",
"version": "0.44.1",
"version": "0.44.2",
"description": "Improve your MouseHunt experience.",
"author": "Brad Parbs <brad@bradparbs.com> (https://bradparbs.com/)",
"license": "MIT",
Expand Down
8 changes: 5 additions & 3 deletions src/modules/inventory-lock-and-hide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,12 @@ const addHideStyles = (items) => {
};

const hideItemsInTrapBrowser = () => {
const hideItemsStyles = itemSettings.hidden.map((id) => `.campPage-trap-itemBrowser-items .campPage-trap-itemBrowser-item[data-item-id="${id}"]`).join(',');
if (itemSettings?.hidden && itemSettings.hidden.length > 0) {
const hideItemsStyles = itemSettings.hidden.map((id) => `.campPage-trap-itemBrowser-items .campPage-trap-itemBrowser-item[data-item-id="${id}"]`).join(',');

// Add styles to hide tags and items
addStyles(`${hideItemsStyles} { display: none; }`, 'inventory-lock-and-hide-hide-styles');
// Add styles to hide tags and items
addStyles(`${hideItemsStyles} { display: none; }`, 'inventory-lock-and-hide-hide-styles');
}
};

const main = async () => {
Expand Down

0 comments on commit 1bdd8cb

Please sign in to comment.