Skip to content

Commit

Permalink
do not allow the same asset to be added to a list more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
jobelenus committed Jun 20, 2024
1 parent fcc3d48 commit 489e796
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/web/src/store/asset.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,12 @@ export const useAssetStore = () => {
},
actions: {
addAssetSelection(id: AssetId) {
this.selectedAssets.push(id);
this.LOAD_ASSET(id);
this.syncSelectionIntoUrl();
this.selectedFuncs = [];
if (!this.selectedAssets.includes(id)) {
this.selectedAssets.push(id);
this.LOAD_ASSET(id);
this.syncSelectionIntoUrl();
this.selectedFuncs = [];
}
},
setAssetSelection(id: AssetId) {
if (!this.selectedAssets.includes(id)) {
Expand Down

0 comments on commit 489e796

Please sign in to comment.