Skip to content

Commit 276836e

Browse files
alan-agius4AndrewKushnir
authored andcommitted
fix(http): do not display warnings Angular detected that a HttpClient request with the keepalive option was sent using XHR when option is not true (#62536)
Currently, this warning is always displayed as the option defaults to false. We update the logic to only display the warning when it's true. PR Close #62536
1 parent 11d8173 commit 276836e

File tree

1 file changed

+1
-1
lines changed
  • packages/common/http/src

1 file changed

+1
-1
lines changed

packages/common/http/src/xhr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function validateXhrCompatibility(req: HttpRequest<any>) {
9393

9494
// Check each unsupported option and warn if present
9595
for (const {property, errorCode} of unsupportedOptions) {
96-
if (property in req) {
96+
if (req[property]) {
9797
console.warn(
9898
formatRuntimeError(
9999
errorCode,

0 commit comments

Comments
 (0)