mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-28 17:07:16 +00:00
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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user