Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
7327c4cb
Commit
7327c4cb
authored
May 27, 2017
by
Sébastiaan Versteeg
Browse files
Fix children not having keys in map
parent
8368f1ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/components/Event.js
View file @
7327c4cb
...
...
@@ -144,21 +144,22 @@ const Event = (props) => {
}).
filter
(
item
=>
item
)
.
map
((
list
)
=>
{
while
(
list
.
length
<
3
)
{
list
.
push
({});
list
.
push
({
member
:
null
});
}
const
key
=
list
[
0
].
member
+
list
[
1
].
member
+
list
[
2
].
member
;
return
(
<
View
style
=
{
styles
.
registrationsRow
}
>
<
View
key
=
{
key
}
style
=
{
styles
.
registrationsRow
}
>
{
list
.
map
((
reg
,
i
)
=>
{
const
style
=
i
===
1
?
styles
.
registrationsItemMargin
:
styles
.
registrationsItem
;
if
(
reg
.
name
)
{
return
(
<
MemberView
member
=
{
reg
}
style
=
{
style
}
/
>
<
MemberView
key
=
{
key
+
i
.
toString
()}
member
=
{
reg
}
style
=
{
style
}
/
>
);
}
return
(
<
View
style
=
{
style
}
/
>
<
View
key
=
{
key
+
i
.
toString
()}
style
=
{
style
}
/
>
);
})}
<
/View
>
...
...
Write
Preview
Supports
Markdown
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