Skip to content

Commit 41068cc

Browse files
committed
Prevent crash on empty directories
1 parent 6a8d0f0 commit 41068cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

update.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function processDir (dir, options, listCallback) {
274274
})
275275

276276
// Update 'latest' symlink (except for wasm/ where the link is hard-coded to point at the one in bin/).
277-
if (dir !== '/wasm') {
277+
if (dir !== '/wasm' && latestReleaseFile) {
278278
const releaseExtension = binaryExtensions.find(function (extension) { return latestReleaseFile.endsWith(extension) })
279279

280280
binaryExtensions.forEach(function (extension) {

0 commit comments

Comments
 (0)