mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +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) => {
|
this.state.list.map((data) => {
|
||||||
return React.createElement(typeToComponent[data.type ?? "post"], {
|
return React.createElement(typeToComponent[data.type ?? "post"] ?? PostCard, {
|
||||||
key: data._id,
|
key: data._id,
|
||||||
data: data,
|
data: data,
|
||||||
events: {
|
events: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user