Fix linting
This commit is contained in:
parent
553ba9db9a
commit
bb5189c9ed
35 changed files with 157 additions and 866 deletions
|
@ -4,7 +4,7 @@ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|||
|
||||
function randomID() {
|
||||
let rand = '';
|
||||
for (let i = 0; i < 12; i++) {
|
||||
for (let i = 0; i < 12; i += 1) {
|
||||
rand += chars.charAt(Math.floor((Math.random() * chars.length)));
|
||||
}
|
||||
return rand;
|
||||
|
@ -18,7 +18,7 @@ async function checkId(Files, fileId, attempts) {
|
|||
if (file === null) {
|
||||
return fileId;
|
||||
}
|
||||
return checkId(randomID(), ++attempts); // eslint-disable-line no-param-reassign
|
||||
return checkId(Files, randomID(), attempts + 1);
|
||||
}
|
||||
|
||||
export default function (Files) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue