From c8955d10836c04aa7f77a67ae2704df6d5b7027b Mon Sep 17 00:00:00 2001 From: Johan Groth Date: Thu, 14 Mar 2024 08:52:50 +0100 Subject: [PATCH] fix(tab-bar): ensure component is initialized before handling resize event --- src/components/tab-bar/tab-bar.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/tab-bar/tab-bar.tsx b/src/components/tab-bar/tab-bar.tsx index f2540c2eba..4b580adb82 100644 --- a/src/components/tab-bar/tab-bar.tsx +++ b/src/components/tab-bar/tab-bar.tsx @@ -159,6 +159,10 @@ export class TabBar { @Listen('resize', { passive: true, target: 'window' }) protected handleWindowResize() { + if (!this.scrollArea) { + return; + } + this.handleScroll(); }