mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-01 21:32:01 -08:00
test fix for request error handling
This commit is contained in:
parent
157073b5b2
commit
57d05543df
5 changed files with 107 additions and 88 deletions
|
|
@ -101,7 +101,7 @@ class ExtraNetworksClusterize extends Clusterize {
|
|||
if (this.lru instanceof LRUCache) {
|
||||
this.lru.clear();
|
||||
}
|
||||
super.clear(true);
|
||||
super.clear("Loading...");
|
||||
}
|
||||
|
||||
async load(force_init_data) {
|
||||
|
|
@ -182,10 +182,12 @@ class ExtraNetworksClusterize extends Clusterize {
|
|||
const data = {};
|
||||
// Fetch any div IDs not in the LRU Cache using our callback.
|
||||
if (missing_div_ids.length !== 0) {
|
||||
Object.assign(
|
||||
data,
|
||||
await this.options.callbacks.fetchData(missing_div_ids),
|
||||
);
|
||||
const fetched_data = await this.options.callbacks.fetchData(missing_div_ids);
|
||||
if (Object.keys(fetched_data).length !== missing_div_ids.length) {
|
||||
// expected data. got nothing.
|
||||
return {};
|
||||
}
|
||||
Object.assign(data, fetched_data);
|
||||
}
|
||||
|
||||
// Now load any cached IDs from the LRU Cache
|
||||
|
|
@ -230,7 +232,7 @@ class ExtraNetworksClusterizeTreeList extends ExtraNetworksClusterize {
|
|||
|
||||
clear() {
|
||||
this.selected_div_id = null;
|
||||
super.clear(true);
|
||||
super.clear("Loading...");
|
||||
}
|
||||
|
||||
getBoxShadow(depth) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue