mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
fix empty attachements
This commit is contained in:
parent
bebebe6508
commit
17892508e7
@ -17,6 +17,9 @@ export default async (payload = {}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isAttachmentArray) {
|
if (isAttachmentArray) {
|
||||||
|
// clean empty attachments
|
||||||
|
attachments = attachments.filter((attachment) => attachment)
|
||||||
|
|
||||||
// fix attachments with url strings if needed
|
// fix attachments with url strings if needed
|
||||||
attachments = attachments.map((attachment) => {
|
attachments = attachments.map((attachment) => {
|
||||||
if (typeof attachment === "string") {
|
if (typeof attachment === "string") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user