Browse Source

fix(billing): Avoid usage chart warning (#70547)

Scott Cooper 10 months ago
parent
commit
d190f012ec

+ 3 - 1
static/app/views/dashboards/widgetBuilder/widgetBuilderSortBy.spec.tsx

@@ -241,7 +241,9 @@ describe('WidgetBuilder', function () {
       // Selector "sortDirection"
       expect(screen.getByText('High to low')).toBeInTheDocument();
       // Selector "sortBy"
-      expect(screen.getAllByText('count()')).toHaveLength(3);
+      await waitFor(() => {
+        expect(screen.getAllByText('count()')).toHaveLength(3);
+      });
     });
 
     it('sortBy defaults to the first field value when changing display type to table', async function () {

+ 3 - 1
static/app/views/organizationStats/usageChart/index.tsx

@@ -441,7 +441,9 @@ function UsageChartBody({
 
     if (chartSeries) {
       chartSeries.forEach(chartOption => {
-        legend.push({name: `${chartOption.name}`});
+        if (chartOption.name) {
+          legend.push({name: `${chartOption.name}`});
+        }
       });
     }