platforms
platforms copied to clipboard
imageBlurhash is set to null by updatePost when image missing
If you edit a post and trigger updatePost
then the data sent
data: {
title,
description,
content,
slug,
image,
imageBlurhash: await getBlurDataURL(image),
published,
}
has no image so imageBlurhash ends up being null
and gets updated accordingly, causing an error. I found that
data: {
title,
description,
content,
slug,
image,
imageBlurhash: (await getBlurDataURL(image)) ?? undefined,
published,
}
fixes the problem