* Fix filter by stock status dropdown ordering

* Update assets/js/blocks/stock-filter/utils.ts

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

* Update assets/js/blocks/stock-filter/utils.ts

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
This commit is contained in:
Kirtan Gajjar 2023-04-21 22:34:34 +05:30 committed by GitHub
parent 7c25db1c80
commit 030a9ae267
1 changed files with 3 additions and 3 deletions

View File

@ -23,9 +23,9 @@ export const getActiveFilters = (
? params.split( ',' ) ? params.split( ',' )
: ( params as string[] ); : ( params as string[] );
return Object.keys( filters ).filter( ( filter ) => const filterKeys = Object.keys( filters );
parsedParams.includes( filter )
); return parsedParams.filter( ( param ) => filterKeys.includes( param ) );
}; };
export function generateUniqueId() { export function generateUniqueId() {