Browse Source

fix(performance): Drop query tokens for metrics (#39457)

- This fixes a bug where if there was a query in the URL we'd keep it
even if the selected dataset was metrics, which meant that the query
would likely fail because of the limited tags in the metrics dataset
William Mak 2 years ago
parent
commit
97e0bc6396
1 changed files with 3 additions and 0 deletions
  1. 3 0
      static/app/views/performance/data.tsx

+ 3 - 0
static/app/views/performance/data.tsx

@@ -468,6 +468,9 @@ function generateGenericPerformanceEventView(
     }
     conditions.freeText = [];
   }
+  if (isLimitedSearch) {
+    conditions.tokens = [];
+  }
   savedQuery.query = conditions.formatString();
 
   const eventView = EventView.fromNewQueryWithLocation(savedQuery, location);