mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
handle undefined type
This commit is contained in:
parent
3a26a9668d
commit
0fcb359eca
@ -399,7 +399,7 @@ export class PostsListsComponent extends React.Component {
|
||||
}
|
||||
{
|
||||
this.state.list.map((data) => {
|
||||
return React.createElement(typeToComponent[data.type ?? "post"], {
|
||||
return React.createElement(typeToComponent[data.type ?? "post"] ?? PostCard, {
|
||||
key: data._id,
|
||||
data: data,
|
||||
events: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user