Removed ids on RTC block nodes
This commit is contained in:
parent
48cc52ac24
commit
8391b18764
|
@ -14,7 +14,7 @@ import {
|
||||||
isNodeUploadNode,
|
isNodeUploadNode,
|
||||||
isUploadNodeAudioNode,
|
isUploadNodeAudioNode,
|
||||||
isUploadNodeImageNode,
|
isUploadNodeImageNode,
|
||||||
isUploadNodeVideoNode,
|
isUploadNodeVideoNode
|
||||||
} from "../constants";
|
} from "../constants";
|
||||||
import {
|
import {
|
||||||
EndpointAttribute,
|
EndpointAttribute,
|
||||||
|
@ -76,6 +76,11 @@ export const convertRTCToEndpointRTC = (
|
||||||
...others,
|
...others,
|
||||||
children: children.map((node) => {
|
children: children.map((node) => {
|
||||||
if (isNodeBlockNode(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)
|
// Add anchor hash on section block (TOC)
|
||||||
if (isBlockNodeSectionBlock(node)) {
|
if (isBlockNodeSectionBlock(node)) {
|
||||||
index++;
|
index++;
|
||||||
|
|
Loading…
Reference in New Issue