diff --git a/src/engine/target.js b/src/engine/target.js index 12428ac954..7e2d8106eb 100644 --- a/src/engine/target.js +++ b/src/engine/target.js @@ -697,7 +697,8 @@ class Target extends EventEmitter { return null; }; - const allReferences = this.blocks.getAllVariableAndListReferences(undefined, true); + // Get all variables including broadcasts + const allReferences = this.blocks.getAllVariableAndListReferences(null, true); const unreferencedLocalVarIds = []; if (Object.keys(this.variables).length > 0) { for (const localVarId in this.variables) {