Fix packaging Scratch 2 projects with no variables
This commit is contained in:
1 file changed
+7
-5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user