mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-06 15:15:05 +08:00
Merge pull request #14873 from AUTOMATIC1111/check_extensions_list_on_apply_js_method
if extensions page not loaded, prevent apply
This commit is contained in:
commit
2f1e2c492f
@ -2,8 +2,11 @@
|
|||||||
function extensions_apply(_disabled_list, _update_list, disable_all) {
|
function extensions_apply(_disabled_list, _update_list, disable_all) {
|
||||||
var disable = [];
|
var disable = [];
|
||||||
var update = [];
|
var update = [];
|
||||||
|
const extensions_input = gradioApp().querySelectorAll('#extensions input[type="checkbox"]');
|
||||||
gradioApp().querySelectorAll('#extensions input[type="checkbox"]').forEach(function(x) {
|
if (extensions_input.length == 0) {
|
||||||
|
throw Error("Extensions page not yet loaded.");
|
||||||
|
}
|
||||||
|
extensions_input.forEach(function(x) {
|
||||||
if (x.name.startsWith("enable_") && !x.checked) {
|
if (x.name.startsWith("enable_") && !x.checked) {
|
||||||
disable.push(x.name.substring(7));
|
disable.push(x.name.substring(7));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user