File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/pages/Campaign/widgets/TotalBugsByOsAndDevices/ChartTotalBugsByDevice Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,18 @@ const useBugsByDevices = (campaignId: number) => {
8585 } , [ data ] ) ;
8686
8787 // If there is only one type of device, remove the first level
88- if ( chartData . children && chartData . children . length === 1 ) {
88+ if (
89+ chartData . children &&
90+ chartData . children . length === 1 &&
91+ chartData . children [ 0 ] . children
92+ ) {
8993 chartData . children = chartData . children [ 0 ] . children ;
9094 // If there is only one OS, remove the second level
91- if ( chartData . children && chartData . children . length === 1 ) {
95+ if (
96+ chartData . children &&
97+ chartData . children . length === 1 &&
98+ chartData . children [ 0 ] . children
99+ ) {
92100 chartData . children = chartData . children [ 0 ] . children ;
93101 }
94102 }
You can’t perform that action at this time.
0 commit comments