Skip to content

Commit 21ba9d2

Browse files
committed
fix fixed
1 parent 309fcd9 commit 21ba9d2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/lib/project-fetcher-hoc.jsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,11 @@ function protobufToJson(buffer) {
131131
shadow: target.blocks[block].shadow,
132132
topLevel: target.blocks[block].topLevel,
133133
x: target.blocks[block].x,
134-
y: target.blocks[block].y,
135-
mutation: {
134+
y: target.blocks[block].y
135+
}
136+
137+
if (target.blocks[block].mutation) {
138+
newTarget.blocks[block].mutation = {
136139
tagName: target.blocks[block].mutation.tagName,
137140
proccode: target.blocks[block].mutation.proccode,
138141
argumentids: target.blocks[block].mutation.argumentids,
@@ -142,7 +145,8 @@ function protobufToJson(buffer) {
142145
returns: target.blocks[block].mutation._returns,
143146
edited: target.blocks[block].mutation.edited,
144147
optype: target.blocks[block].mutation.optype,
145-
color: target.blocks[block].mutation.color
148+
color: target.blocks[block].mutation.color,
149+
children: []
146150
}
147151
}
148152

@@ -199,6 +203,8 @@ function protobufToJson(buffer) {
199203
newJson.extensionURLs[extensionURL] = json.extensionURLs[extensionURL];
200204
}
201205

206+
console.log(newJson);
207+
202208
return newJson;
203209
}
204210

0 commit comments

Comments
 (0)