Skip to content

Commit

Permalink
[APM] Fix statement to match function name
Browse files Browse the repository at this point in the history
  • Loading branch information
kpatticha committed Jan 27, 2023
1 parent 8a2ecc3 commit 5e4b6a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions x-pack/plugins/apm/common/environment_filter_values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ export const ENVIRONMENT_NOT_DEFINED = {

function isEnvironmentDefined(environment: string) {
return (
!environment ||
environment === ENVIRONMENT_NOT_DEFINED_VALUE ||
environment === ENVIRONMENT_ALL_VALUE
environment &&
environment !== ENVIRONMENT_NOT_DEFINED_VALUE &&
environment !== ENVIRONMENT_ALL_VALUE
);
}

export function getEnvironmentEsField(environment: string) {
if (isEnvironmentDefined(environment)) {
if (!isEnvironmentDefined(environment)) {
return {};
}

return { [SERVICE_ENVIRONMENT]: environment };
}

export function getEnvironmentKuery(environment: string) {
if (isEnvironmentDefined(environment)) {
if (!isEnvironmentDefined(environment)) {
return null;
}

Expand Down

0 comments on commit 5e4b6a8

Please sign in to comment.