mirror of
https://github.com/vladmandic/automatic
synced 2026-09-13 01:59:42 +02:00
Update extraNetworks.js
Additional fix for lastTab updating with an empty string. This could cause the issue to reemerge if one of the three tabs was the initial tab upon startup.
This commit is contained in:
committed by
GitHub
parent
84df9f7b4d
commit
4c8bf3f66a
@@ -14,8 +14,13 @@ const getENActiveTab = () => {
|
||||
else if (gradioApp().getElementById('extras_image')?.checkVisibility()) tabName = 'process';
|
||||
else if (gradioApp().getElementById('interrogate_image')?.checkVisibility()) tabName = 'caption';
|
||||
else if (gradioApp().getElementById('tab-gallery-search')?.checkVisibility()) tabName = 'gallery';
|
||||
if (['process', 'caption', 'gallery'].includes(tabName)) tabName = lastTab;
|
||||
else lastTab = tabName;
|
||||
|
||||
if (['process', 'caption', 'gallery'].includes(tabName)) {
|
||||
tabName = lastTab;
|
||||
} else if (tabName !== '') {
|
||||
lastTab = tabName;
|
||||
}
|
||||
|
||||
if (tabName !== '') return tabName;
|
||||
// legacy method
|
||||
if (gradioApp().getElementById('tab_txt2img')?.style.display === 'block') tabName = 'txt2img';
|
||||
|
||||
Reference in New Issue
Block a user