Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Fix missing flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Apr 25, 2023
1 parent 6df643b commit fb4c398
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/editor-components/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ export const getProductTags = ( { selected = [], search } ) => {

return Promise.all( requests.map( ( path ) => apiFetch( { path } ) ) ).then(
( data ) => {
return uniqBy( flatten( data ), 'id' );
const flatData = data.flat();
return uniqBy( flatData, ( item ) => item.id );
}
);
};
Expand Down

0 comments on commit fb4c398

Please sign in to comment.