Skip to content

Commit

Permalink
fixed successful blocks for blocks exist new blocks exist schema
Browse files Browse the repository at this point in the history
  • Loading branch information
srietkerk committed Mar 6, 2024
1 parent 038ac49 commit d9cb032
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pxteditor/code-validation/runValidatorPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ function runBlocksExistValidation(usedBlocks: Blockly.Block[], inputs: pxt.block
const blockResults = validateBlocksExist({ usedBlocks, requiredBlockCounts });
let successfulBlocks: Blockly.Block[] = [];
if (blockResults.passed) {
const blockIdsFromValidator = Object.keys(inputs.blockCounts)
const blockId = blockIdsFromValidator?.[0];
const blockId = inputs.blockCounts[0].blockId;
successfulBlocks = blockResults.successfulBlocks.length ? blockResults.successfulBlocks[0][blockId] : [];
}
return [successfulBlocks, blockResults.passed];
Expand Down

0 comments on commit d9cb032

Please sign in to comment.