diff --git a/src/serialization/sb3.js b/src/serialization/sb3.js index 1155fd2ce..35267a5e2 100644 --- a/src/serialization/sb3.js +++ b/src/serialization/sb3.js @@ -100,7 +100,7 @@ const parseScratchObject = function (object, runtime) { const target = sprite.createClone(); // Load target properties from JSON. if (object.hasOwnProperty('variables')) { - for (let j = 0; j < object.variables.length; j++) { + for (let j in object.variables) { const variable = object.variables[j]; const newVariable = new Variable( variable.id,