mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
fix(header): do not error on collapsable header on devices that do not support IntersectionObserve (#21222)
This commit is contained in:
@ -87,6 +87,7 @@ export class Header implements ComponentInterface {
|
||||
|
||||
private async setupCollapsibleHeader(contentEl: HTMLIonContentElement | null, pageEl: Element | null) {
|
||||
if (!contentEl || !pageEl) { console.error('ion-header requires a content to collapse, make sure there is an ion-content.'); return; }
|
||||
if (typeof (IntersectionObserver as any) === 'undefined') { return; }
|
||||
|
||||
this.scrollEl = await contentEl.getScrollElement();
|
||||
|
||||
|
Reference in New Issue
Block a user