Skip to content

Commit

Permalink
fix(router-store): google upstream (#3177)
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver authored Oct 16, 2021
1 parent 0217790 commit 20afb21
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/router-store/src/router_store_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class StoreRouterConnectingModule {
private routerState: SerializedRouterStateSnapshot | null = null;
private storeState: any;
private trigger = RouterTrigger.NONE;
private stateKey: StateKeyOrSelector;
private readonly stateKey: StateKeyOrSelector;

static forRoot<
T extends BaseRouterStoreState = SerializedRouterStateSnapshot
Expand Down Expand Up @@ -195,8 +195,9 @@ export class StoreRouterConnectingModule {
private router: Router,
private serializer: RouterStateSerializer<SerializedRouterStateSnapshot>,
private errorHandler: ErrorHandler,
@Inject(ROUTER_CONFIG) private config: StoreRouterConfig,
@Inject(ACTIVE_RUNTIME_CHECKS) private activeRuntimeChecks: RuntimeChecks
@Inject(ROUTER_CONFIG) private readonly config: StoreRouterConfig,
@Inject(ACTIVE_RUNTIME_CHECKS)
private readonly activeRuntimeChecks: RuntimeChecks
) {
this.stateKey = this.config.stateKey as StateKeyOrSelector;

Expand Down Expand Up @@ -381,7 +382,7 @@ function isSameUrl(first: string, second: string): boolean {
}

function stripTrailingSlash(text: string): string {
if (text.length > 0 && text[text.length - 1] === '/') {
if (text?.length > 0 && text[text.length - 1] === '/') {
return text.substring(0, text.length - 1);
}
return text;
Expand Down

0 comments on commit 20afb21

Please sign in to comment.