Skip to content

Commit

Permalink
merge: #4006
Browse files Browse the repository at this point in the history
4006: Do not allow the same asset to be added to a list more than once r=jobelenus a=jobelenus

<img src="https://media1.giphy.com/media/mc7uduXz800wtqU7WV/giphy.gif"/>

Co-authored-by: John Obelenus <[email protected]>
  • Loading branch information
si-bors-ng[bot] and jobelenus authored Jun 20, 2024
2 parents fcc3d48 + 489e796 commit 13d7215
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 13d7215

Please sign in to comment.