address PR feedback

This commit is contained in:
Ryan Meador
2026-01-19 21:04:04 -05:00
parent a38e5af3b3
commit 300bc31de7
3 changed files with 31 additions and 35 deletions
+2 -2
View File
@@ -64,8 +64,8 @@ function selected_gallery_index() {
let result = -1;
buttons.forEach((v, i) => { if (v === button) { result = i; } });
if (result === -1 && gradioApp().getElementById('tab-gallery-search')?.checkVisibility()) {
const gallerySelection = window.getGallerySelection?.();
if (gallerySelection && Number.isInteger(gallerySelection.index)) result = gallerySelection.index;
const gallerySelection = window.getGallerySelection();
if (Number.isInteger(gallerySelection.index)) result = gallerySelection.index;
}
return result;
}