Fix: Break infinite loop during cache load failure

This commit is contained in:
Max Berger
2026-03-21 22:58:22 +01:00
parent 11f1875817
commit fc18cadd38

View File

@@ -26,7 +26,7 @@ import { is_current_scene, pop_scene, push_scene } from "../scenes/scene_manager
class CollectionsCache {
constructor() {
this.child_collections = null;
/** @type {?Array<import("../models/collection.js").Collection>} */ this.child_collections = null;
/** @type {?Array<import("../api/sharing.js").Share>} */ this.incoming_shares = null;
this.server_features = null;
/** @type {?XMLHttpRequest} */ this.collections_req = null;
@@ -73,6 +73,8 @@ class CollectionsCache {
}
if (error) {
onerror(error);
this.child_collections = [];
this.incoming_shares = [];
pop_scene();
} else if (collections !== null && shares !== null) {
this.child_collections = collections;