From 8eb400129ae5fe8d6f995986eb407b4393621c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Stanimirovi=C4=87?= Date: Fri, 30 Sep 2022 08:21:07 +0200 Subject: [PATCH] fix(router-store): set undefined for unserializable route title (#3593) Closes #3495 --- modules/router-store/src/serializers/minimal_serializer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/router-store/src/serializers/minimal_serializer.ts b/modules/router-store/src/serializers/minimal_serializer.ts index e68e248ac3..aaf8428904 100644 --- a/modules/router-store/src/serializers/minimal_serializer.ts +++ b/modules/router-store/src/serializers/minimal_serializer.ts @@ -43,7 +43,10 @@ export class MinimalRouterStateSerializer pathMatch: route.routeConfig.pathMatch, redirectTo: route.routeConfig.redirectTo, outlet: route.routeConfig.outlet, - title: route.routeConfig.title, + title: + typeof route.routeConfig.title === 'string' + ? route.routeConfig.title + : undefined, } : null, queryParams: route.queryParams,