Skip to content

Commit

Permalink
small fix to only load own artists if there are no artists provided
Browse files Browse the repository at this point in the history
  • Loading branch information
greg6775 committed Aug 13, 2024
1 parent a19ab48 commit 825bfd3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pages/music/views/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ export const createArtistSheet = (name?: string) => {
export const EditArtistsDialog = (artists: Reference<ArtistRef[]>, provided?: Artist[]) => {
const artistList = provided ? asRef(provided) : asRef(<Artist[]> []);

API.music.artists.list().then(stupidErrorAlert)
.then((x) => artistList.setValue(x));
if (!provided) {
API.music.artists.list().then(stupidErrorAlert)
.then((x) => artistList.setValue(x));
}

const dialog = SheetDialog(
sheetStack,
Expand Down

0 comments on commit 825bfd3

Please sign in to comment.