fix: album title state weirdness (#12874)

This commit is contained in:
Daniel Dietzler 2024-09-24 17:13:37 +02:00 committed by GitHub
parent af8f3774d0
commit b45fce8ddf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View file

@ -7,6 +7,7 @@
export let id: string;
export let albumName: string;
export let isOwned: boolean;
export let onUpdate: (albumName: string) => void;
$: newAlbumName = albumName;
@ -16,17 +17,17 @@
}
try {
await updateAlbumInfo({
({ albumName } = await updateAlbumInfo({
id,
updateAlbumDto: {
albumName: newAlbumName,
},
});
}));
onUpdate(albumName);
} catch (error) {
handleError(error, $t('errors.unable_to_save_album'));
return;
}
albumName = newAlbumName;
};
</script>