Skip to content

Commit 5e85cde

Browse files
HollowMan6ericblackmonGoogle
authored andcommitted
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 <hollowman@opensuse.org> (cherry picked from commit 18ee0ec)
1 parent 11b7b72 commit 5e85cde

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

core/insertion_marker_manager.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,12 @@ export class InsertionMarkerManager {
225225
eventUtils.disable();
226226
let result: BlockSvg;
227227
try {
228-
const blockJson = blocks.save(sourceBlock);
228+
const blockJson = blocks.save(sourceBlock, {
229+
addCoordinates: false,
230+
addInputBlocks: false,
231+
addNextBlocks: false,
232+
doFullSerialization: false,
233+
});
229234
if (!blockJson) {
230235
throw new Error('Failed to serialize source block.');
231236
}

0 commit comments

Comments
 (0)