From df9dbd112a11e03846bf2eb99a03ce59bb7fda85 Mon Sep 17 00:00:00 2001 From: Corey Frang Date: Wed, 15 Aug 2018 17:04:49 -0400 Subject: [PATCH] Make importing with deserialized stuff okay --- src/serialization/sb3.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/serialization/sb3.js b/src/serialization/sb3.js index 145ee7200..16ab90015 100644 --- a/src/serialization/sb3.js +++ b/src/serialization/sb3.js @@ -690,6 +690,7 @@ const deserializeInputs = function (inputs, parentId, blocks) { for (const inputName in inputs) { if (!inputs.hasOwnProperty(inputName)) continue; const inputDescArr = inputs[inputName]; + if (!Array.isArray(inputDescArr)) continue; let block = null; let shadow = null; const blockShadowInfo = inputDescArr[0]; @@ -723,6 +724,7 @@ const deserializeFields = function (fields) { for (const fieldName in fields) { if (!fields.hasOwnProperty(fieldName)) continue; const fieldDescArr = fields[fieldName]; + if (!Array.isArray(fieldDescArr)) continue; obj[fieldName] = { name: fieldName, value: fieldDescArr[0]