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
+1 -1
View File
@@ -14,7 +14,7 @@ import type { RenderOptions } from "@/types/rte/option"
export function groupEmbedsByUid(embedsArray: Node<Embeds>[]) {
const embedsByUid = embedsArray.reduce<EmbedByUid>((acc, embed) => {
if (embed.node.system.uid) {
if (embed.node.system?.uid) {
acc[embed.node.system.uid] = embed
}
return acc