Skip to content

Commit 4d55f8d

Browse files
committed
Revert PR 131 because workspace.getVariableMap() doesn't return an object that has getAllVariables or getVariableUsesById functions.
1 parent 8b4d9fb commit 4d55f8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/editor/extended_python_generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ export class ExtendedPythonGenerator extends PythonGenerator {
248248
exportedBlocks.push(callFunctionBlock);
249249
}
250250

251-
const allVariables = workspace.getVariableMap().getAllVariables();
251+
const allVariables = workspace.getAllVariables();
252252
for (const variableModel of allVariables) {
253253
// Only variables that are used outside of functions are exported. (I'm not sure if this is
254254
// the right choice, since all blockly variables are global variables.)
255255
let exported = false;
256-
const variableUsesById = workspace.getVariableMap().getVariableUsesById(variableModel.getId())
256+
const variableUsesById = workspace.getVariableUsesById(variableModel.getId())
257257
if (variableUsesById.length === 0) {
258258
continue;
259259
}

0 commit comments

Comments
 (0)