Rework moveset generation logic and fix window selection crash

This commit is contained in:
Flashfyre committed 2024-04-02 00:16:06 -04:00
1 parent b2f79c5756
commit 321c3f3e90
3 files changed
+16 -6

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ export function updateWindowType(scene: BattleScene, windowTypeIndex: integer):
const windowObjects: [Phaser.GameObjects.NineSlice, WindowVariant][] = [];
const themedObjects: Phaser.GameObjects.Image[] = [];
const traverse = (object: any) => {
if (object.hasOwnProperty('children')) {
if (object.hasOwnProperty('children') && object.children instanceof Phaser.GameObjects.DisplayList) {
const children = object.children as Phaser.GameObjects.DisplayList;
for (let child of children.getAll())
traverse(child);