Fix: Break infinite loop during cache load failure
This commit is contained in:
@@ -26,7 +26,7 @@ import { is_current_scene, pop_scene, push_scene } from "../scenes/scene_manager
|
|||||||
|
|
||||||
class CollectionsCache {
|
class CollectionsCache {
|
||||||
constructor() {
|
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;
|
/** @type {?Array<import("../api/sharing.js").Share>} */ this.incoming_shares = null;
|
||||||
this.server_features = null;
|
this.server_features = null;
|
||||||
/** @type {?XMLHttpRequest} */ this.collections_req = null;
|
/** @type {?XMLHttpRequest} */ this.collections_req = null;
|
||||||
@@ -73,6 +73,8 @@ class CollectionsCache {
|
|||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
onerror(error);
|
onerror(error);
|
||||||
|
this.child_collections = [];
|
||||||
|
this.incoming_shares = [];
|
||||||
pop_scene();
|
pop_scene();
|
||||||
} else if (collections !== null && shares !== null) {
|
} else if (collections !== null && shares !== null) {
|
||||||
this.child_collections = collections;
|
this.child_collections = collections;
|
||||||
|
|||||||
Reference in New Issue
Block a user