From 1b1987f28df0eaf3f47fc5833e17a803f7ba1b8c Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Tue, 24 Jun 2025 23:04:37 -0500 Subject: make frontend work with backend and wait until album response recieved before initializing albums page. extra checks around config --- static/src/pages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'static/src/pages.js') diff --git a/static/src/pages.js b/static/src/pages.js index f6a8b9b..e2199a4 100644 --- a/static/src/pages.js +++ b/static/src/pages.js @@ -34,13 +34,13 @@ export default class Page { this.initialized = false } - setVisible(visible) { + async setVisible(visible) { this.pageContainer.classList.toggle("hidden!", !visible) this.visible = visible if (this.visible) { /* initialize page */ if (!this.initialized && this.initialize) - this.initialized = this.initialize(this.pageContainer) + this.initialized = await this.initialize(this.pageContainer) /* set selected attribute on the link */ for (const a of menu.querySelectorAll("a")) { -- cgit v1.2.3