angular-docs-cn/packages/service-worker/worker/test
George Kalpakas cb2ca9a66e fix(service-worker): correctly handle unrecoverable state when a client no longer exists (#42736)
Previously, the ServiceWorker assumed that a client found in
`clientVersionMap` would exist (i.e. it could be retrieved via
`clients.get()`). However, if a browser tab had been closed, the
corresponding client (while present in `clientVersionMap`, which is only
updated on ServiceWorker initialization) would not be retrievable via
`clients.get()`.

This commit fixes it by checking whether the client exists before trying
to notify it about an unrecoverable state.

PR Close #42736
2021-07-08 10:28:22 -07:00
..
BUILD.bazel test: setup circular dependency tests for all entry points (#34774) 2020-01-23 11:36:40 -08:00
data_spec.ts refactor(service-worker): make `SwTestHarness.envIsSupported()` a standalone function (#42736) 2021-07-08 10:28:22 -07:00
happy_spec.ts fix(service-worker): correctly handle unrecoverable state when a client no longer exists (#42736) 2021-07-08 10:28:22 -07:00
idle_spec.ts refactor(service-worker): make `SwTestHarness.envIsSupported()` a standalone function (#42736) 2021-07-08 10:28:22 -07:00
prefetch_spec.ts refactor(service-worker): move mock event classes to their own file (#42736) 2021-07-08 10:28:22 -07:00