Skip to content

Commit

Permalink
[#18] Fix bug with case sensitivity in system IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
arbron committed Aug 26, 2022
1 parent 165fe35 commit 60f6204
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

# 2.2.1
- [#18] Fix bug with case sensitivity in system IDs

# 2.2.0
- Adjust patching to use libWrapper if available
- Fix issue with temp HP color not being configurable in Toolkit13
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"readme": "https://raw.githubusercontent.com/arbron/fvtt-hp-bar/main/readme.md",
"changelog": "https://raw.githubusercontent.com/arbron/fvtt-hp-bar/main/changelog.md",
"bugs": "https://github.com/arbron/fvtt-hp-bar/issues",
"version": "2.1.2",
"version": "2.2.1",
"minimumCoreVersion": "0.7.9",
"compatibleCoreVersion": "10",
"compatibility": {
Expand Down Expand Up @@ -106,7 +106,7 @@
"path": "lang/pt-br.json"
}
],
"manifestPlusVersion": "1.1.0",
"manifestPlusVersion": "1.2.0",
"flags": {
"allowBugReporter": true
}
Expand Down
3 changes: 2 additions & 1 deletion scripts/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Hooks.once('setup', async function() {
let drawingSystem;
try {
log(`Loading HP bar for ${system.title}`);
const drawingModule = await import(`./systems/${system.id ?? system.name}.mjs`);
const systemId = (system.id ?? system.name).toLowerCase();
const drawingModule = await import(`./systems/${systemId}.mjs`);
drawingSystem = drawingModule.default;
} catch(e) {
log(`Falling back to generic HP bar drawing`);
Expand Down

0 comments on commit 60f6204

Please sign in to comment.