Add Error Handling for collections cache load failures
This commit is contained in:
@@ -52,11 +52,11 @@ class CollectionsCache {
|
||||
* @param {string} password
|
||||
* @param {import("../models/collection.js").Collection} principal_collection
|
||||
* @param {function(string):void} onerror
|
||||
* @param {function(Array<import("../models/collection.js").Collection>, Array<import("../api/sharing.js").Share>):void} displayData
|
||||
* @param {function(Array<import("../models/collection.js").Collection>, Array<import("../api/sharing.js").Share>, boolean):void} displayData
|
||||
*/
|
||||
getChildCollections(user, password, principal_collection, onerror, displayData) {
|
||||
if (this.child_collections !== null && this.incoming_shares !== null) {
|
||||
displayData(this.child_collections, this.incoming_shares);
|
||||
displayData(this.child_collections, this.incoming_shares, false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class CollectionsCache {
|
||||
} else if (collections !== null && shares !== null) {
|
||||
this.child_collections = collections;
|
||||
this.incoming_shares = shares;
|
||||
displayData(this.child_collections, this.incoming_shares);
|
||||
displayData(this.child_collections, this.incoming_shares, true);
|
||||
pop_scene();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user