mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
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:
committed by
Brandy Carney
parent
eba0866a34
commit
96f550ceb8
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user