This commit is contained in:
Paul Kaplan 2018-06-27 10:44:28 -04:00
parent 9f517bd483
commit 4967155285

View file

@ -133,7 +133,6 @@ const parseBlockList = function (blockList, addBroadcastMsg, getVariableId, exte
// eslint-disable-next-line no-use-before-define // eslint-disable-next-line no-use-before-define
const parsedBlockAndComments = parseBlock(block, addBroadcastMsg, getVariableId, const parsedBlockAndComments = parseBlock(block, addBroadcastMsg, getVariableId,
extensions, comments, commentIndex); extensions, comments, commentIndex);
const parsedBlock = parsedBlockAndComments[0]; const parsedBlock = parsedBlockAndComments[0];
// Update commentIndex // Update commentIndex
commentIndex = parsedBlockAndComments[1]; commentIndex = parsedBlockAndComments[1];
@ -711,8 +710,9 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension
comments[commentIndex] : null; comments[commentIndex] : null;
const blockMetadata = specMapBlock(sb2block); const blockMetadata = specMapBlock(sb2block);
if (!blockMetadata) { if (!blockMetadata) {
// No block opcode found, exclude this block, increment the comment id and // No block opcode found, exclude this block, increment the comment id,
// send all linked comments back to zero/zero to prevent serialization issues. // make all block comments into workspace comments and send them to zero/zero
// to prevent serialization issues.
if (commentsForParsedBlock) { if (commentsForParsedBlock) {
commentsForParsedBlock.forEach(comment => { commentsForParsedBlock.forEach(comment => {
comment.blockId = null; comment.blockId = null;