mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-20 22:52:46 -05:00
chore: fix undefined issue
This commit is contained in:
parent
49c6f0353e
commit
64f06f8467
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ import type { Router } from 'express';
|
|||
import type { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler, $SidebarPackage } from '../../../../types';
|
||||
import type { Config } from '@verdaccio/types';
|
||||
|
||||
const getOrder = order => {
|
||||
const getOrder = (order = 'asc') => {
|
||||
return order === 'asc';
|
||||
};
|
||||
|
||||
|
@ -59,7 +59,7 @@ function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth,
|
|||
|
||||
const { web } = config;
|
||||
// $FlowFixMe
|
||||
const order: boolean = web.sort_packages ? getOrder(web.sort_packages) : true;
|
||||
const order: boolean = config.web ? getOrder(web.sort_packages) : true;
|
||||
|
||||
next(sortByName(await processPermissionsPackages(packages), order));
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue