mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
test(service-worker): remove redundant ternary operator from MockRequest initialization (#46912)
Since the `init` parameter has a default value of `{}`, it can never be
`!== undefined`. Thus, it is not necessary to account for that case.
PR Close #46912
This commit is contained in:
parent
3b34254932
commit
99e5fa157d
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ export class MockRequest extends MockBody implements Request {
|
|||
url: string;
|
||||
|
||||
constructor(input: string|Request, init: RequestInit = {}) {
|
||||
super(init !== undefined ? (init.body as (string | null)) || null : null);
|
||||
super((init.body as string | null) ?? null);
|
||||
if (typeof input !== 'string') {
|
||||
throw 'Not implemented';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue