Skip to content

Commit

Permalink
fix: correct list truncated
Browse files Browse the repository at this point in the history
  • Loading branch information
maxakuru committed Jun 12, 2024
1 parent 1be702c commit 30b38b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/support/loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const loop = (fn, ctx, opts) => {
}, {});
ctx.log.info(JSON.stringify({
metric: 'bundler-performance',
loop: state.times.length,
measures,
stats: ctx.attributes.stats,
}));
Expand Down
3 changes: 2 additions & 1 deletion src/support/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class Bucket {
*/
async list(prefix, { limit } = { limit: Infinity }) {
let ContinuationToken;
const truncated = false;
let truncated = false;
const objects = [];
do {
// eslint-disable-next-line no-await-in-loop
Expand All @@ -404,6 +404,7 @@ class Bucket {
path: `${key.substring(prefix.length)}`,
});
if (objects.length >= limit) {
truncated = true;
break;
}
}
Expand Down

0 comments on commit 30b38b0

Please sign in to comment.