Skip to content

Commit

Permalink
fix shadow block generation for non-array blocks that return arrays (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll authored Jan 17, 2025
1 parent abf081f commit 3509176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pxtblocks/toolbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function createShadowValue(info: pxtc.BlocksInfo, p: pxt.blocks.BlockPara
const value = document.createElement("value");
value.setAttribute("name", p.definitionName);

const isArray = isArrayType(p.type);
const isArray = (shadowId === "lists_create_with" || !shadowId) ? isArrayType(p.type) : undefined;

const shadow = document.createElement(((isVariable || isArray) && !parentIsShadow) ? "block" : "shadow");

Expand Down

0 comments on commit 3509176

Please sign in to comment.