We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55f9ac4 commit fb07644Copy full SHA for fb07644
src/shared/utils/transformations.ts
@@ -2,14 +2,20 @@ import { GroupByList } from 'shared/constants';
2
3
export const getDimensions = (dimensions: any) => {
4
const { ids, names } = dimensions;
5
- if (!ids) return [];
+ if (!ids) {
6
+ return [];
7
+ }
8
+
9
return ids.map((id: string, index: number) => ({ value: id, label: names[index] || id }));
10
};
11
12
export const defaultFilter = { 'No filter': [] };
13
14
export const getFilters = (labels: any[]) => {
- if (!labels?.length) return defaultFilter;
15
+ if (!labels?.length) {
16
+ return defaultFilter;
17
18
19
return {
20
...defaultFilter,
21
...labels.reduce((acc: any, label: any) => {
0 commit comments