mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -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) {
|
for (const inputName in inputs) {
|
||||||
if (!inputs.hasOwnProperty(inputName)) continue;
|
if (!inputs.hasOwnProperty(inputName)) continue;
|
||||||
const inputDescArr = inputs[inputName];
|
const inputDescArr = inputs[inputName];
|
||||||
|
if (!Array.isArray(inputDescArr)) continue;
|
||||||
let block = null;
|
let block = null;
|
||||||
let shadow = null;
|
let shadow = null;
|
||||||
const blockShadowInfo = inputDescArr[0];
|
const blockShadowInfo = inputDescArr[0];
|
||||||
|
@ -723,6 +724,7 @@ const deserializeFields = function (fields) {
|
||||||
for (const fieldName in fields) {
|
for (const fieldName in fields) {
|
||||||
if (!fields.hasOwnProperty(fieldName)) continue;
|
if (!fields.hasOwnProperty(fieldName)) continue;
|
||||||
const fieldDescArr = fields[fieldName];
|
const fieldDescArr = fields[fieldName];
|
||||||
|
if (!Array.isArray(fieldDescArr)) continue;
|
||||||
obj[fieldName] = {
|
obj[fieldName] = {
|
||||||
name: fieldName,
|
name: fieldName,
|
||||||
value: fieldDescArr[0]
|
value: fieldDescArr[0]
|
||||||
|
|
Loading…
Reference in a new issue