mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
typeof null === 'object', so add an explicit check for null
This commit is contained in:
parent
9c80725d98
commit
7253136e08
1 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ function extractFilterGroups(ast) {
|
|||
return groups.concat(
|
||||
buildGroupValues(args, argValue => {
|
||||
// this only handles simple values
|
||||
if (typeof argValue !== 'object') {
|
||||
if (argValue !== null && typeof argValue !== 'object') {
|
||||
return argValue;
|
||||
}
|
||||
})
|
||||
|
@ -170,7 +170,7 @@ function extractFilterGroups(ast) {
|
|||
return groups.concat(
|
||||
buildGroupValues(args, argValue => {
|
||||
// recursively collect filter groups
|
||||
if (typeof argValue === 'object' && argValue.type === 'expression') {
|
||||
if (argValue !== null && typeof argValue === 'object' && argValue.type === 'expression') {
|
||||
return extractFilterGroups(argValue);
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue