Skip to content

Commit

Permalink
Fix disabled tabs not saved (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
beardeddragon5 authored Jan 18, 2024
1 parent a8f5d00 commit 0602816
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "item_placeholder",
"version": "2.0.0",
"version": "2.0.1",
"description": "Item Placeholder for Melvor Idle",
"homepage": "https://mod.io/g/melvoridle/m/item-placeholder",
"author": "Matthias Ramsauer",
Expand Down
2 changes: 2 additions & 0 deletions src/setup.mts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export async function setup(ctx: ItemPlaceholderContext) {

ctx.onCharacterLoaded(() => {
// NOTE: the character storage should be empty at the start
const disabledTabs = ctx.characterStorage.getItem('disabled-tabs') ?? [];
ctx.characterStorage.clear();
ctx.characterStorage.setItem('disabled-tabs', disabledTabs);

// NOTE: this is for the rare case that items in a tab get duplicated.
let foundDuplicate = false;
Expand Down

0 comments on commit 0602816

Please sign in to comment.