Await update_auth_data before continuing

Await the window.update_auth_data call in initgui.js so subsequent logic (such as popup spinner hiding and timing) runs after authentication data has been updated. This prevents race conditions where later UI code executes before auth state is fully applied.
This commit is contained in:
jelveh
2026-02-23 18:19:35 -08:00
parent 8f4a38ae0b
commit eaaeb4e6a4
+1 -1
View File
@@ -1146,7 +1146,7 @@ window.initgui = async function (options) {
resolve();
});
window.update_auth_data(data.token, data.user);
await window.update_auth_data(data.token, data.user);
// if this is a popup, hide the spinner, make sure it was visible for at least 2 seconds
if(window.embedded_in_popup) await new Promise(async resolve => {