fix: refactor use of tokens

This commit is contained in:
Christel Westerberg
2024-05-21 15:17:12 +02:00
parent ad343aa666
commit a19b0687bb
8 changed files with 60 additions and 125 deletions

View File

@@ -253,7 +253,7 @@ export const renderOptions: RenderOptions = {
const type = node.attrs.type
if (type === RTEItemTypeEnum.asset) {
const image = embeds?.[node?.attrs?.["asset-uid"]]
if (image.node.__typename === EmbedEnum.SysAsset) {
if (image?.node.__typename === EmbedEnum.SysAsset) {
const alt = image?.node?.title ?? node.attrs.alt
const alignment = node.attrs?.style?.["text-align"]
? {