From 50e2d982209352a8a74b40dd8d2b99a1f20f9b11 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2017 12:02:24 +0200 Subject: [PATCH] fix: first tab selection was throwing an error --- packages/ui/src/utility/tabs/tabs.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/utility/tabs/tabs.component.ts b/packages/ui/src/utility/tabs/tabs.component.ts index cb38a85f1..91abdde06 100644 --- a/packages/ui/src/utility/tabs/tabs.component.ts +++ b/packages/ui/src/utility/tabs/tabs.component.ts @@ -30,7 +30,9 @@ export class TabsComponent { } select(tab: TabComponent) { - this.selected.deactivated.next(); + if (this.selected) { + this.selected.deactivated.next(); + } this.selected = tab; tab.activated.next(); }