mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-24 02:50:26 -08:00
fix js func signature and not forget to initialize confirmation var to prevent exception upon cancelling confirmation
This commit is contained in:
parent
700340448b
commit
ce42879438
2 changed files with 7 additions and 4 deletions
|
|
@ -162,12 +162,13 @@ function selected_tab_id() {
|
|||
|
||||
}
|
||||
|
||||
function clear_prompt(_, _prompt_neg, confirmed,_steps) {
|
||||
function clear_prompt(_, _prompt_neg, confirmed, _token_counter) {
|
||||
confirmed = false
|
||||
|
||||
if(confirm("Delete prompt?")) {
|
||||
confirmed = true
|
||||
} else {
|
||||
return [_, confirmed]
|
||||
return [_, _prompt_neg, confirmed, _token_counter]
|
||||
}
|
||||
|
||||
if(selected_tab_id() == "tab_txt2img") {
|
||||
|
|
@ -176,7 +177,7 @@ return [_, confirmed]
|
|||
update_token_counter("txt2img_token_button")
|
||||
}
|
||||
|
||||
return [_, _prompt_neg, confirmed,_steps]
|
||||
return [_, _prompt_neg, confirmed, _token_counter]
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue