Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(content): check for this._scroll #10216

Merged
merged 3 commits into from
Jan 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/content/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ export class Content extends Ion implements OnDestroy, OnInit {
let cacheHeaderHeight = this._hdrHeight;
let cacheFooterHeight = this._ftrHeight;
let cacheTabsPlacement = this._tabsPlacement;
let scrollEvent: ScrollEvent;
let tabsTop = 0;
this._pTop = 0;
this._pRight = 0;
Expand All @@ -617,7 +618,11 @@ export class Content extends Ion implements OnDestroy, OnInit {
this._fTop = 0;
this._fBottom = 0;

const scrollEvent = this._scroll.ev;
// In certain cases this._scroll is undefined
// if that is the case then we should just return
if (!this._scroll) return;

scrollEvent = this._scroll.ev;

let ele: HTMLElement = this._elementRef.nativeElement;
if (!ele) {
Expand Down