diff --git a/utils/ChromiumDownloader.js b/utils/ChromiumDownloader.js index bc80cff9..6b5ecc7f 100644 --- a/utils/ChromiumDownloader.js +++ b/utils/ChromiumDownloader.js @@ -109,6 +109,8 @@ module.exports = { * @return {!Array} */ downloadedRevisions: function() { + if (!fs.existsSync(DOWNLOADS_FOLDER)) + return []; let fileNames = fs.readdirSync(DOWNLOADS_FOLDER); return fileNames.map(fileName => parseFolderPath(fileName)).filter(revision => !!revision); },