Skip to content

Commit 4ca0740

Browse files
Neeraj SirdeshmukhNeeraj Sirdeshmukh
authored andcommitted
modified function
1 parent 01df777 commit 4ca0740

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@ const extractSortby = function (params) {
188188

189189
sortbyRules = sortbys.map((sortbyRule) => {
190190
if (sortbyRule[0] === '-') {
191-
return [{ field: sortbyRule.slice(1), direction: 'desc' }]
191+
return { field: sortbyRule.slice(1), direction: 'desc' }
192192
}
193193
if (sortbyRule[0] === '+') {
194-
return [{ field: sortbyRule.slice(1), direction: 'asc' }]
194+
return { field: sortbyRule.slice(1), direction: 'asc' }
195195
}
196-
return [{ field: sortbyRule, direction: 'asc' }]
196+
return { field: sortbyRule, direction: 'asc' }
197197
})
198198
} else {
199199
// POST request

0 commit comments

Comments
 (0)