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

* fix(content): check for this._scroll

* chore(lint): fix validate error
This commit is contained in:
Justin Willis
2017-01-30 12:25:59 -06:00
committed by Brandy Carney
parent eba0866a34
commit 96f550ceb8

View File

@@ -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;
@@ -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) {