remove unnecessary assignment

This commit is contained in:
papuSpartan 2022-10-20 17:33:33 -05:00
parent 9cc4974d23
commit a816514980

View File

@ -163,21 +163,20 @@ function selected_tab_id() {
} }
function trash_prompt(_,_, is_img2img) { function trash_prompt(_,_, is_img2img) {
//txt2img_token_button
if(!confirm("Delete prompt?")) return false if(!confirm("Delete prompt?")) return false
if(selected_tab_id() == "tab_txt2img") { if(selected_tab_id() == "tab_txt2img") {
pos_prompt = txt2img_textarea = gradioApp().querySelector("#txt2img_prompt > label > textarea"); gradioApp().querySelector("#txt2img_prompt > label > textarea").value = "";
neg_prompt = txt2img_textarea = gradioApp().querySelector("#txt2img_neg_prompt > label > textarea"); gradioApp().querySelector("#txt2img_neg_prompt > label > textarea").value = "";
pos_prompt.value = "" update_token_counter("img2img_token_button")
neg_prompt.value = ""
} else { } else {
pos_prompt = txt2img_textarea = gradioApp().querySelector("#img2img_prompt > label > textarea"); gradioApp().querySelector("#img2img_prompt > label > textarea").value = "";
neg_prompt = txt2img_textarea = gradioApp().querySelector("#img2img_neg_prompt > label > textarea"); gradioApp().querySelector("#img2img_neg_prompt > label > textarea").value = "";
pos_prompt.value = "" update_token_counter("txt2img_token_button")
neg_prompt.value = ""
} }
return true return true