🐛 Fix error when body haven't attachment in post

This commit is contained in:
LittleSheep 2024-07-24 16:28:29 +08:00
parent 8366bda846
commit ef58430060

View File

@ -293,7 +293,8 @@ class _PostItemState extends State<PostItem> {
),
child: AttachmentList(
parentId: widget.item.id.toString(),
attachmentsId: item.body['attachments'].cast<int>() ?? List.empty(),
attachmentsId:
item.body['attachments']?.cast<int>() ?? List.empty(),
divided: true,
),
),