Skip to content

Commit

Permalink
Update card on correct tab
Browse files Browse the repository at this point in the history
  • Loading branch information
missionfloyd committed Sep 27, 2023
1 parent 5ef669d commit 99aa702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/extraNetworks.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function extraNetworksEditUserMetadata(event, tabname, extraPage, cardName) {
function extraNetworksRefreshSingleCard(page, tabname, name) {
requestGet("./sd_extra_networks/get-single-card", {page: page, tabname: tabname, name: name}, function(data) {
if (data && data.html) {
var card = gradioApp().querySelector('.card[data-name=' + JSON.stringify(name) + ']'); // likely using the wrong stringify function
var card = gradioApp().querySelector(`#${tabname}_${page.replace(" ", "_")}_cards > .card[data-name="${name}"]`);

var newDiv = document.createElement('DIV');
newDiv.innerHTML = data.html;
Expand Down

0 comments on commit 99aa702

Please sign in to comment.