mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Fix race condition when saving settings for TTS
This commit is contained in:
		@@ -362,15 +362,15 @@ function onApplyClick() {
 | 
			
		||||
    Promise.all([
 | 
			
		||||
        ttsProvider.onApplyClick(),
 | 
			
		||||
        updateVoiceMap()
 | 
			
		||||
    ]).catch(error => {
 | 
			
		||||
    ]).then(() => {
 | 
			
		||||
        extension_settings.tts[ttsProviderName] = ttsProvider.settings
 | 
			
		||||
        saveSettingsDebounced()
 | 
			
		||||
        setTtsStatus('Successfully applied settings', true)
 | 
			
		||||
        console.info(`Saved settings ${ttsProviderName} ${JSON.stringify(ttsProvider.settings)}`)
 | 
			
		||||
    }).catch(error => {
 | 
			
		||||
        console.error(error)
 | 
			
		||||
        setTtsStatus(error, false)
 | 
			
		||||
    })
 | 
			
		||||
    
 | 
			
		||||
    extension_settings.tts[ttsProviderName] = ttsProvider.settings
 | 
			
		||||
    saveSettingsDebounced()
 | 
			
		||||
    setTtsStatus('Successfully applied settings', true)
 | 
			
		||||
    console.info(`Saved settings ${ttsProviderName} ${JSON.stringify(ttsProvider.settings)}`)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function onEnableClick() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user