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:
Alan Cohen 2021-04-10 21:26:09 -04:00 committed by Zach Arend
parent 1381301afe
commit 319da894be
1 changed files with 2 additions and 2 deletions

View File

@ -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));
}
}