Skip to content

Commit fe4a13c

Browse files
committed
fix issue when r2 bucket is empty
1 parent 5045f1d commit fe4a13c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/generate-md-exports.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ async function createWork() {
109109
})
110110
);
111111
continuationToken = response.NextContinuationToken;
112-
for (const {Key, ETag} of response.Contents) {
112+
for (const {Key, ETag} of response.Contents || []) {
113113
existingFilesOnR2.set(Key, ETag.slice(1, -1)); // Remove quotes from ETag
114114
}
115115
} while (continuationToken);

0 commit comments

Comments
 (0)