docs: change ActivatedRouteStub code sample to work with strictNullChecks on (#41559)
convertToParamMap() does not accept undefined. Fix code sample so it can be used in strict mode without requiring changes. PR Close #41559
This commit is contained in:
parent
1381301afe
commit
319da894be
|
@ -21,8 +21,8 @@ export class ActivatedRouteStub {
|
|||
/** The mock paramMap observable */
|
||||
readonly paramMap = this.subject.asObservable();
|
||||
|
||||
/** Set the paramMap observables's next value */
|
||||
setParamMap(params?: Params) {
|
||||
/** Set the paramMap observable's next value */
|
||||
setParamMap(params: Params = {}) {
|
||||
this.subject.next(convertToParamMap(params));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue