Skip to content

Commit

Permalink
GeoNode#1551: Sort param serializer fix (GeoNode#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuren1 authored Sep 11, 2023
1 parent ace25d4 commit 181ad4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geonode_mapstore_client/client/js/utils/APIUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ export const getApiToken = () => {
* @returns {Object} updated params
*/
export const paramsSerializer = (params) => {
const {include, exclude, ...rest} = params ?? {}; // Update bracket params (if any)
const {include, exclude, sort, ...rest} = params ?? {}; // Update bracket params (if any)
let queryParams = '';
if (!isEmpty(include) || !isEmpty(exclude)) {
queryParams = queryString.stringify({include, exclude}, { arrayFormat: 'bracket'});
if (!isEmpty(include) || !isEmpty(exclude) || !isEmpty(sort)) {
queryParams = queryString.stringify({include, exclude, sort}, { arrayFormat: 'bracket'});
}
if (!isEmpty(rest)) {
queryParams = (isEmpty(queryParams) ? '' : `${queryParams}&`) + queryString.stringify(rest);
Expand Down

0 comments on commit 181ad4f

Please sign in to comment.