mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Make importing with deserialized stuff okay
This commit is contained in:
parent
fe46a81cc9
commit
df9dbd112a
1 changed files with 2 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue