More code cleanup from PR review

This commit is contained in:
Karishma Chadha 2022-05-16 16:23:41 -04:00
parent fd31a777e2
commit 1dfaa02c97
2 changed files with 15 additions and 8 deletions
test/fixtures

View file

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