From 6cc09f9cc1c27df8adc21e1228cd8c89329bf6ba Mon Sep 17 00:00:00 2001 From: Christian Torres Date: Tue, 23 Mar 2021 16:55:24 -0600 Subject: [PATCH] Checking if childFooter is set before trying to expand There are cases where the childFooter is null and we're getting this error. So similar to what you have on collapse we should validate first. ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'nativeElement' of null TypeError: Cannot read property 'nativeElement' of null at IonicPullupComponent.expand (http://localhost/module-es2015.js:4817:49) --- projects/ionic-pullup/src/lib/ionic-pullup.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/ionic-pullup/src/lib/ionic-pullup.component.ts b/projects/ionic-pullup/src/lib/ionic-pullup.component.ts index b813843..51a4b6a 100644 --- a/projects/ionic-pullup/src/lib/ionic-pullup.component.ts +++ b/projects/ionic-pullup/src/lib/ionic-pullup.component.ts @@ -198,6 +198,7 @@ export class IonicPullupComponent implements OnInit, AfterContentInit, OnChanges } expand() { + if (!this.childFooter) { return; } this.footerMeta.lastPosY = this.footerMeta.toolbarDefaultExpandedPosition; // reset ionContent scaling