Remove the requirement to use devmode for the tab switching to work
This commit is contained in:
parent
2ba9ab2b21
commit
e71d2133f2
1 changed files with 6 additions and 6 deletions
|
|
@ -68,13 +68,13 @@ Hooks.once(`init`, () => {
|
||||||
Hooks.once(`ready`, () => {
|
Hooks.once(`ready`, () => {
|
||||||
console.debug(".dungeon | Ready");
|
console.debug(".dungeon | Ready");
|
||||||
|
|
||||||
if (game.settings.get(`dotdungeon`, `devMode`)) {
|
let defaultTab = game.settings.get(`dotdungeon`, `defaultTab`);
|
||||||
let tab = game.settings.get(`dotdungeon`, `defaultTab`);
|
if (defaultTab ) {
|
||||||
if (!ui.sidebar?.tabs?.[tab]) {
|
if (!ui.sidebar?.tabs?.[defaultTab]) {
|
||||||
console.error(`Couldn't find a sidebar tab with ID:`, tab);
|
console.error(`Couldn't find a sidebar tab with ID:`, defaultTab);
|
||||||
} else {
|
} else {
|
||||||
console.debug(`Switching sidebar tab to:`, tab);
|
console.debug(`Switching sidebar tab to:`, defaultTab);
|
||||||
ui.sidebar.tabs[tab].activate();
|
ui.sidebar.tabs[defaultTab].activate();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue