mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-14 11:33:51 +00:00
Removed unecesary check
This commit is contained in:
@@ -23,11 +23,7 @@ import { stringifyQuery } from '../../utils/helpers/query';
|
|||||||
const buildShlinkBaseUrl = (url: string, apiVersion: number) => url ? `${url}/rest/v${apiVersion}` : '';
|
const buildShlinkBaseUrl = (url: string, apiVersion: number) => url ? `${url}/rest/v${apiVersion}` : '';
|
||||||
const rejectNilProps = reject(isNil);
|
const rejectNilProps = reject(isNil);
|
||||||
const normalizeOrderByInParams = (params: ShlinkShortUrlsListParams): ShlinkShortUrlsListNormalizedParams => {
|
const normalizeOrderByInParams = (params: ShlinkShortUrlsListParams): ShlinkShortUrlsListNormalizedParams => {
|
||||||
if (!params.orderBy) {
|
const { orderBy = {}, ...rest } = params;
|
||||||
return params as ShlinkShortUrlsListNormalizedParams;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { orderBy, ...rest } = params;
|
|
||||||
const [ firstKey ] = Object.keys(orderBy);
|
const [ firstKey ] = Object.keys(orderBy);
|
||||||
const [ firstValue ] = Object.values(orderBy);
|
const [ firstValue ] = Object.values(orderBy);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user