mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
b40c9d0e59
In this commit, the `ngServerMode` check is moved outside the RxJS `pipe()` to ensure that server-only logic is excluded from client bundles. Previously, the `tap()` operator and its closure were always included in the output, even though `ngServerMode` was false on the client and the side effect was never triggered. By guarding the observable chain earlier, this reduces the RxJS stack frame depth, which simplifies debugging by avoiding unnecessary operator noise in client-side stack traces. The resulting logic is also easier to reason about and avoids evaluating `HttpResponse` instances where not needed. PR Close #62238