fix: Resolve async initialization and asset loading errors

This commit is contained in:
Restart2008
2025-12-07 21:47:19 -08:00
parent b9979c6b81
commit a386187342
+1 -1
View File
@@ -81,7 +81,7 @@ export class UnitLayer implements Layer {
this.eventBus.on(MouseUpEvent, (e) => this.onMouseUp(e));
this.eventBus.on(TouchEvent, (e) => this.onTouch(e));
this.eventBus.on(UnitSelectionEvent, (e) => this.onUnitSelectionChange(e));
this.initializeAssetsAndRedraw().catch((error) =>
void this.initializeAssetsAndRedraw().catch((error) =>
console.error("Error in async initialization:", error),
); // Call the async method without awaiting
}