From 8391b187640f701b1d5b040da1f0fd945c3dc4e5 Mon Sep 17 00:00:00 2001 From: DrMint <29893320+DrMint@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:40:27 +0200 Subject: [PATCH] Removed ids on RTC block nodes --- src/utils/endpoints.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/endpoints.ts b/src/utils/endpoints.ts index 983acd9..667171f 100644 --- a/src/utils/endpoints.ts +++ b/src/utils/endpoints.ts @@ -14,7 +14,7 @@ import { isNodeUploadNode, isUploadNodeAudioNode, isUploadNodeImageNode, - isUploadNodeVideoNode, + isUploadNodeVideoNode } from "../constants"; import { EndpointAttribute, @@ -76,6 +76,11 @@ export const convertRTCToEndpointRTC = ( ...others, children: children.map((node) => { if (isNodeBlockNode(node)) { + // Remove ids in blocks to avoid considering them when caching + if ("id" in node.fields) { + delete node.fields.id; + } + // Add anchor hash on section block (TOC) if (isBlockNodeSectionBlock(node)) { index++;