Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#13411 from AUTOMATIC1111/update-card…
Browse files Browse the repository at this point in the history
…-metadata

Update card on correct tab when editing metadata
  • Loading branch information
AUTOMATIC1111 authored Sep 30, 2023
2 parents 4083639 + 99aa702 commit 3b0be0f
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 3b0be0f

Please sign in to comment.