refactor(service-worker): remove unnecessary cast in mock redirect check

Use the typed Response.redirected property directly in the service-worker test mock instead of casting to any.
This commit is contained in:
Yenya030
2026-03-17 10:50:49 -05:00
committed by Alan Agius
parent 37ee9ffd9e
commit afe690ec07
@@ -166,7 +166,7 @@ export class MockServerState {
const url = req.url.split('?')[0];
if (this.resources.has(url)) {
const response = this.resources.get(url)!.clone();
if ((response as any).redirected && req.redirect === 'error') {
if (response.redirected && req.redirect === 'error') {
throw new Error('Redirect disallowed by request policy.');
}
return response;