Skip to content

Commit 53aa2c8

Browse files
committed
Fix comparison issue
1 parent 9a25f45 commit 53aa2c8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

shared/AppInsightsCore/src/utils/EnvUtils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,11 @@ function redactQueryParameters(url: string, config?: IConfiguration): string {
456456
return url;
457457
}
458458

459-
if (config && config.redactUrls === UrlRedactionOptions.append) {
459+
const option = config ? config.redactUrls : undefined;
460+
461+
if (option === UrlRedactionOptions.append) {
460462
sensitiveParams = DEFAULT_SENSITIVE_PARAMS.concat(config.redactQueryParams);
461-
} else if (config && config.redactUrls === UrlRedactionOptions.replace) {
463+
} else if (option === UrlRedactionOptions.replace) {
462464
sensitiveParams = config.redactQueryParams;
463465
} else {
464466
sensitiveParams = DEFAULT_SENSITIVE_PARAMS;

0 commit comments

Comments
 (0)