From 18ee0ec41b2a326255f3270166e60b565f75b975 Mon Sep 17 00:00:00 2001 From: Hollow Man Date: Mon, 14 Aug 2023 19:19:42 +0300 Subject: [PATCH] fix: insertion marker's next blocks become real block (#7384) Don't add next block to the insertion marker when we do an insertion marker json serialization. Also, to keep consistent with the old behavior, we don't need to add input blocks for the insertion marker. And we don't need to do a full serialization here as it will just become an insertion marker. Resolves #7383 Address issues in PR #7364 Signed-off-by: Hollow Man --- core/insertion_marker_manager.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/insertion_marker_manager.ts b/core/insertion_marker_manager.ts index 35e46dc019a..effe7821902 100644 --- a/core/insertion_marker_manager.ts +++ b/core/insertion_marker_manager.ts @@ -225,7 +225,12 @@ export class InsertionMarkerManager { eventUtils.disable(); let result: BlockSvg; try { - const blockJson = blocks.save(sourceBlock); + const blockJson = blocks.save(sourceBlock, { + addCoordinates: false, + addInputBlocks: false, + addNextBlocks: false, + doFullSerialization: false, + }); if (!blockJson) { throw new Error('Failed to serialize source block.'); }