From 81a0969530aa724d3e61c9d392553fdbab41b0d5 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Sun, 4 Dec 2016 13:33:27 +0100 Subject: [PATCH] fix(tab): tab button without content does not crash --- src/components/tabs/tab.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/tabs/tab.ts b/src/components/tabs/tab.ts index 288ca03d55d..488247e903d 100644 --- a/src/components/tabs/tab.ts +++ b/src/components/tabs/tab.ts @@ -314,8 +314,12 @@ export class Tab extends NavControllerBase { // to refresh the tabbar and content dimensions to be sure // they're lined up correctly nativeRaf(() => { - var content = this.getActive().getIONContent(); - content.resize(); + const active = this.getActive(); + if (!active) { + return; + } + const content = active.getIONContent(); + content && content.resize(); }); done(true); }