Merge pull request #657 from neurosie/variable-fix

Fix variable deserializing
This commit is contained in:
Paul Kaplan 2017-08-09 09:58:13 -04:00 committed by GitHub
commit 3beebdc7be

View file

@ -100,7 +100,7 @@ const parseScratchObject = function (object, runtime) {
const target = sprite.createClone(); const target = sprite.createClone();
// Load target properties from JSON. // Load target properties from JSON.
if (object.hasOwnProperty('variables')) { 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 variable = object.variables[j];
const newVariable = new Variable( const newVariable = new Variable(
variable.id, variable.id,