Fix packaging Scratch 2 projects with no variables

This commit is contained in:
Thomas Weber committed 2021-06-24 14:09:22 -05:00
1 parent cfb052670b
commit 308dc08975
1 file changed
+7 -5
+7 -5
View File
@@ -13,11 +13,13 @@ const identifyProjectType = (projectData) => {
const analyzeScratch2 = (projectData) => {
const stageVariables = {};
for (const {name, value, isPersistent} of projectData.variables) {
stageVariables[name] = {
name,
isCloud: isPersistent
};
if (projectData.variables) {
for (const {name, value, isPersistent} of projectData.variables) {
stageVariables[name] = {
name,
isCloud: isPersistent
};
}
}
return {
stageVariables