File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
static/app/views/explore/metrics Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ export function encodeMetricQueryParams(metricQuery: BaseMetricQuery): string {
107107export function defaultMetricQuery ( {
108108 type = 'aggregate' ,
109109} : { type ?: 'aggregate' | 'equation' } = { } ) : BaseMetricQuery {
110+ const newFields =
111+ type === 'equation' ? [ defaultAggregateEquation ( ) ] : defaultAggregateFields ( ) ;
110112 return {
111113 metric : { name : '' , type : '' } ,
112114 queryParams : new ReadableQueryParams ( {
@@ -119,11 +121,8 @@ export function defaultMetricQuery({
119121 sortBys : defaultSortBys ( defaultFields ( ) ) ,
120122
121123 aggregateCursor : '' ,
122- aggregateFields :
123- type === 'equation' ? [ defaultAggregateEquation ( ) ] : defaultAggregateFields ( ) ,
124- aggregateSortBys : defaultAggregateSortBys (
125- type === 'equation' ? [ defaultAggregateEquation ( ) ] : defaultAggregateFields ( )
126- ) ,
124+ aggregateFields : newFields ,
125+ aggregateSortBys : defaultAggregateSortBys ( newFields ) ,
127126 } ) ,
128127 } ;
129128}
You can’t perform that action at this time.
0 commit comments