From 042c4d4fdad8ad34ead11932e1da2bfc68dd79dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=B5=B7?= Date: Fri, 24 Apr 2020 10:28:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index/src/app/services/component-state.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index/src/app/services/component-state.service.ts b/index/src/app/services/component-state.service.ts index 94aca02..74e270e 100644 --- a/index/src/app/services/component-state.service.ts +++ b/index/src/app/services/component-state.service.ts @@ -33,7 +33,7 @@ export class ComponentStateService { const prefix = path.substr(0, indexOf === 0 ? path.length : indexOf); this.dealWithPathChange(prefix) this.currentPath = prefix; - subscriber.next(prefix) + if (subscriber) subscriber.next(prefix) }); return ob; }