From 308dc08975ea48aeb5038778f62e453d21454624 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sun, 20 Jun 2021 16:52:11 -0500 Subject: [PATCH] Fix packaging Scratch 2 projects with no variables --- src/packager/lib/download-project.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/packager/lib/download-project.js b/src/packager/lib/download-project.js index 3bee10e..e6dec40 100644 --- a/src/packager/lib/download-project.js +++ b/src/packager/lib/download-project.js @@ -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