From 085d0aaa26b312fc2bac3d63a452c4b543e1527b Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Mon, 13 Jun 2016 15:30:29 +0200 Subject: [PATCH] Fix ESLint errors with url utils --- js/utils/url.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/js/utils/url.js b/js/utils/url.js index 87225e29..77fba848 100644 --- a/js/utils/url.js +++ b/js/utils/url.js @@ -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}`; }