Curator: Optional Chaining für Genre/Special-Filter abgesichert
This commit is contained in:
@@ -737,7 +737,7 @@ export default function CuratorPage() {
|
||||
<div style={{ fontWeight: 500, marginBottom: '0.25rem' }}>{t('assignGenresLabel')}</div>
|
||||
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.25rem' }}>
|
||||
{genres
|
||||
.filter(g => curatorInfo?.genreIds.includes(g.id))
|
||||
.filter(g => curatorInfo?.genreIds?.includes(g.id))
|
||||
.map(genre => (
|
||||
<label
|
||||
key={genre.id}
|
||||
@@ -852,7 +852,7 @@ export default function CuratorPage() {
|
||||
<option value="no-global">{t('filterNoGlobal')}</option>
|
||||
<optgroup label="Genres">
|
||||
{genres
|
||||
.filter(g => curatorInfo?.genreIds.includes(g.id))
|
||||
.filter(g => curatorInfo?.genreIds?.includes(g.id))
|
||||
.map(genre => (
|
||||
<option key={genre.id} value={`genre:${genre.id}`}>
|
||||
{typeof genre.name === 'string'
|
||||
@@ -863,7 +863,7 @@ export default function CuratorPage() {
|
||||
</optgroup>
|
||||
<optgroup label="Specials">
|
||||
{specials
|
||||
.filter(s => curatorInfo?.specialIds.includes(s.id))
|
||||
.filter(s => curatorInfo?.specialIds?.includes(s.id))
|
||||
.map(special => (
|
||||
<option key={special.id} value={`special:${special.id}`}>
|
||||
★{' '}
|
||||
|
||||
Reference in New Issue
Block a user