init first

This commit is contained in:
Mads Rasmussen
2023-09-27 13:26:14 +02:00
parent 3cbb69167f
commit bc2675d7f6

View File

@@ -57,8 +57,8 @@ export class UmbRepositoryItemsManager<ItemType extends ItemResponseModelBaseMod
}
async #requestItems() {
if (!this.repository) throw new Error('Repository is not initialized');
await this.#init;
if (!this.repository) throw new Error('Repository is not initialized');
if (this.itemsObserver) this.itemsObserver.destroy();
// TODO: Test if its just some items that is gone now, if so then just filter them out. (maybe use code from #removeItem)