Skip to content

Commit

Permalink
fix(tab): tab button without content does not crash
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Dec 4, 2016
1 parent 2ac3b4a commit 81a0969
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/tabs/tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 81a0969

Please sign in to comment.