Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ const useBugsByDevices = (campaignId: number) => {
}
}, [data]);

// If there is only one type of device, remove the first level
if (chartData.children && chartData.children.length === 1) {
chartData.children = chartData.children[0].children;
// If there is only one OS, remove the second level
if (chartData.children && chartData.children.length === 1) {
chartData.children = chartData.children[0].children;
}
}

return { chartData, isLoading: isLoading || isFetching || isError };
};

Expand Down