mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-12 10:08:52 -05:00
fix: put guard around startup chime
This commit is contained in:
@@ -458,8 +458,9 @@ async function UIWindowLogin(options){
|
||||
await p;
|
||||
|
||||
window.update_auth_data(data.token, data.user);
|
||||
|
||||
|
||||
if(options.reload_on_success){
|
||||
sessionStorage.setItem('playChimeNextUpdate', 'yes');
|
||||
window.onbeforeunload = null;
|
||||
console.log('About to redirect, checking URL parameters:', window.location.search);
|
||||
// Replace with a clean URL to prevent password leakage
|
||||
|
||||
@@ -438,7 +438,8 @@ window.update_auth_data = async (auth_token, user)=>{
|
||||
localStorage.setItem('auth_token', auth_token);
|
||||
|
||||
// Play startup chime if enabled
|
||||
if (typeof play_startup_chime === 'function') {
|
||||
if ( sessionStorage.getItem('playChimeNextUpdate') === 'yes' ) {
|
||||
sessionStorage.setItem('playChimeNextUpdate', 'no');
|
||||
play_startup_chime();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user