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