mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Ensure that values are string before validating them
This commit is contained in:
parent
3242f01146
commit
cb242413f8
1 changed files with 2 additions and 1 deletions
|
|
@ -13,11 +13,12 @@ import routeConfiguration from '../../routeConfiguration';
|
|||
* @param {Object} paramValue Search parameter value
|
||||
* @param {Object} filters Filters configuration
|
||||
*/
|
||||
export const validURLParamForExtendedData = (paramName, paramValue, filters) => {
|
||||
export const validURLParamForExtendedData = (paramName, paramValueRaw, filters) => {
|
||||
const filtersArray = Object.values(filters);
|
||||
// resolve configuration for this filter
|
||||
const filterConfig = filtersArray.find(f => f.paramName === paramName);
|
||||
|
||||
const paramValue = paramValueRaw.toString();
|
||||
const valueArray = paramValue ? paramValue.split(',') : [];
|
||||
|
||||
if (filterConfig && valueArray.length > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue