Skip to content

Commit

Permalink
update items when unique is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrasmussen committed Sep 27, 2023
1 parent 0f2d403 commit db6e7c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/shared/repository/repository-items.manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export class UmbRepositoryItemsManager<ItemType extends ItemResponseModelBaseMod
this.#uniques.next(uniques);
//TODO: Check if it's safe to call requestItems here.
// We don't have to request items if there is no uniques.
if (uniques.length === 0) return;
if (uniques.length === 0) {
this.#items.next([]);
return;
}

this.#requestItems();
}

Expand Down

0 comments on commit db6e7c0

Please sign in to comment.