Skip to content

Commit 6cc12aa

Browse files
committed
Fix more issues with control icon replacement
1 parent 559111d commit 6cc12aa

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.11.6
2+
3+
- Fix more issues with ControlIcon replacement
4+
15
## 0.11.5
26

37
- Fix issue with note labels being placed under control icons

module.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "fvtt-perf-optim",
33
"title": "Prime Performance",
4-
"version": "0.11.5",
4+
"version": "0.11.6",
55
"description": "Provides a collection of unofficial performance optimizations and hacks for foundry vtt.",
66
"esmodules": ["dist/fvtt-perf-optim.js"],
77
"languages": [

src/hacks/spritesheetSubstitution.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,11 @@ function removeOldControlIcon(container: PIXI.Container & { controlIcon: Control
133133
return 0;
134134
}
135135
const oldControlIcon = container.controlIcon;
136-
const index = container.getChildIndex(oldControlIcon);
137-
container.removeChild(oldControlIcon);
136+
let index = 0;
137+
try {
138+
index = container.getChildIndex(oldControlIcon);
139+
container.removeChild(oldControlIcon);
140+
} catch {}
138141
return index;
139142
}
140143

0 commit comments

Comments
 (0)