mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
Merge pull request #1612 from Claude-Ray/refactor/simplify-conditional-expr
refactor: simplify the conditional expression
This commit is contained in:
commit
d9c93e8c18
@ -20,7 +20,7 @@ export default function(route: Router, storage: IStorageHandler): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const filteredPackages: Packages = localPackages.filter((localPackage: Package) =>
|
const filteredPackages: Packages = localPackages.filter((localPackage: Package) =>
|
||||||
localPackage[USERS] ? _.keys(localPackage[USERS]).indexOf(remoteUsername) >= 0 : false
|
_.keys(localPackage[USERS]).includes(remoteUsername)
|
||||||
);
|
);
|
||||||
|
|
||||||
res.status(HTTP_STATUS.OK);
|
res.status(HTTP_STATUS.OK);
|
||||||
|
Loading…
Reference in New Issue
Block a user