This commit is contained in:
Karishma Chadha 2022-05-16 17:11:55 -04:00
parent 4ff6288d3f
commit 8cf390d2b5

View file

@ -7,7 +7,7 @@ module.exports = {
},
extractProjectJson: function (path) {
const zip = new AdmZip(path);
const projectEntry = zip.getEntries().find(item => item.entryName.match(/project\.json/))[0];
const projectEntry = zip.getEntries().find(item => item.entryName.match(/project\.json/));
if (projectEntry) {
return JSON.parse(zip.readAsText(projectEntry.entryName, 'utf8'));
}