From deadbed74f8d8187ead799cdb37aa5e2632a28fb Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Wed, 18 Jan 2017 21:26:17 +0100 Subject: [PATCH] . --- app/src/components/app.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/components/app.ts b/app/src/components/app.ts index ab8f8aaa..80c62ad6 100644 --- a/app/src/components/app.ts +++ b/app/src/components/app.ts @@ -128,7 +128,11 @@ export class AppComponent { } selectTab (tab) { - this.lastTabIndex = this.tabs.indexOf(this.activeTab) + if (this.tabs.includes(this.activeTab)) { + this.lastTabIndex = this.tabs.indexOf(this.activeTab) + } else { + this.lastTabIndex = null + } this.activeTab = tab setImmediate(() => { this.elementRef.nativeElement.querySelector(':scope .tab.active iframe').focus()