Skip to content

Commit

Permalink
Ensure a safe number is always returned
Browse files Browse the repository at this point in the history
  • Loading branch information
atjn committed Jul 20, 2024
1 parent 66f2bdb commit 5fff0db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ async function core(rootItemPath, options = {}, returnType = {}) {
);
if (returnType.strict) {
throw error;
} else {
errors.push(error);
}
errors.push(error);
folderSize = Number.MAX_SAFE_INTEGER;
} else {
folderSize = Number(folderSize);
}
folderSize = Number(folderSize);
}

if (returnType.errors) {
Expand Down

0 comments on commit 5fff0db

Please sign in to comment.