Fix toggle field logic
parent
d13d62d271
commit
2ea9272fcd
|
@ -75,16 +75,15 @@ export const toggleField = (query, {name, type}) => {
|
|||
}
|
||||
}
|
||||
|
||||
if (!newFuncs) {
|
||||
// if we are not applying functions apply a field
|
||||
if (!newFuncs.length) {
|
||||
return {
|
||||
...query,
|
||||
fields: [
|
||||
...fields,
|
||||
{
|
||||
type: 'func',
|
||||
alias: `mean_${name}`,
|
||||
args: [{name, type: 'field'}],
|
||||
name: 'mean',
|
||||
name,
|
||||
type: 'field',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue