1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Fix ESLint errors with url utils

This commit is contained in:
Brett Sun 2016-06-13 15:30:29 +02:00
parent 8689585d74
commit 085d0aaa26

View File

@ -6,11 +6,5 @@ export { getCurrentQueryParams, stringifyAsQueryParam, parseQueryParamStr } from
* an API call.
*/
export function generateOrderingQueryParams(orderBy, orderAsc) {
let interpolation = '';
if(!orderAsc) {
interpolation += '-';
}
return interpolation + orderBy;
return orderAsc ? orderBy : `-${orderBy}`;
}