Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
33b0df83
Commit
33b0df83
authored
May 26, 2021
by
Stefan Probst
Browse files
fix: fix empty thumbnail form section
parent
9b265817
Pipeline
#199018
passed with stages
in 19 minutes and 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/item/ThumbnailFormSection/ThumbnailFormSection.tsx
View file @
33b0df83
...
...
@@ -62,12 +62,13 @@ export function ThumbnailFormSection(
<
div
>
or
</
div
>
<
FormField
name
=
{
`
${
prefix
}
media`
}
>
{
({
input
:
media
})
=>
{
const
images
=
media
.
value
?.
filter
(
(
m
:
{
info
?:
MediaDetails
})
=>
m
.
info
?.
category
===
'
image
'
&&
m
.
info
.
hasThumbnail
===
true
,
)
??
[]
const
images
=
Array
.
isArray
(
media
.
value
)
?
media
.
value
.
filter
(
(
m
:
{
info
?:
MediaDetails
})
=>
m
.
info
?.
category
===
'
image
'
&&
m
.
info
.
hasThumbnail
===
true
,
)
:
[]
return
(
<
Fragment
>
<
FormFieldAddButton
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment