fix(ui): resolve race condition in UploadModal by initializing controller early

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-22 23:22:46 +00:00
1 parent c1d7cc768e
commit eb56dbb6a2
3 files changed
+12 -1

No files matched your search

+7 -1
View File
@@ -1263,8 +1263,14 @@ export class UploadModal {
// --- Modal Control ---
async open({ triggerElement } = {}) {
await this.load();
try {
await this.load();
} catch (error) {
devLogger.error("[UploadModal] Failed to load modal template:", error);
}
if (!this.root) return;
this.root.classList.remove("hidden");
this.setGlobalModalState("upload", true);
this.isVisible = true;