From 665e7f36e0a2f8bef649124e124b80dafe010065 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Thu, 1 Feb 2018 22:42:20 +0100 Subject: [PATCH] fix(status-bar): ion-scroll might not exist --- packages/core/src/components/status-tap/status-tap.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/core/src/components/status-tap/status-tap.tsx b/packages/core/src/components/status-tap/status-tap.tsx index ad475f0a62..cec397a8be 100644 --- a/packages/core/src/components/status-tap/status-tap.tsx +++ b/packages/core/src/components/status-tap/status-tap.tsx @@ -30,9 +30,11 @@ export class StatusTap { return; } const scroll = el.closest('ion-scroll') as HTMLIonScrollElement; - (scroll as any).componentOnReady().then(() => { - this.dom.write(() => scroll.scrollToTop(this.duration)); - }); + if (scroll) { + (scroll as any).componentOnReady().then(() => { + this.dom.write(() => scroll.scrollToTop(this.duration)); + }); + } }); } }