From 05823f9e62fe80f7156ada830d2399a76a2ac52a Mon Sep 17 00:00:00 2001 From: Trong Tran Date: Thu, 24 Mar 2016 18:32:22 +0700 Subject: [PATCH] fix(ion-infinite-scroll): Fix error leaving page This fix [5760](https://github.com/driftyco/ionic/issues/5760) --- ionic/components/content/content.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ionic/components/content/content.ts b/ionic/components/content/content.ts index 303fb66a16..026ae8dbd2 100644 --- a/ionic/components/content/content.ts +++ b/ionic/components/content/content.ts @@ -162,6 +162,7 @@ export class Content extends Ion { this.scrollElement.addEventListener(type, handler); return () => { + if (!this.scrollElement) { return; } this.scrollElement.removeEventListener(type, handler); } }