mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-05-20 18:30:30 -04:00
More code cleanup from PR review
This commit is contained in:
parent
fd31a777e2
commit
1dfaa02c97
2 changed files with 15 additions and 8 deletions
test/fixtures
2
test/fixtures/readProjectFile.js
vendored
2
test/fixtures/readProjectFile.js
vendored
|
@ -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'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue