Skip to content

Commit 81a0969

Browse files
committed
fix(tab): tab button without content does not crash
1 parent 2ac3b4a commit 81a0969

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/tabs/tab.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,12 @@ export class Tab extends NavControllerBase {
314314
// to refresh the tabbar and content dimensions to be sure
315315
// they're lined up correctly
316316
nativeRaf(() => {
317-
var content = this.getActive().getIONContent();
318-
content.resize();
317+
const active = this.getActive();
318+
if (!active) {
319+
return;
320+
}
321+
const content = active.getIONContent();
322+
content && content.resize();
319323
});
320324
done(true);
321325
}

0 commit comments

Comments
 (0)