Skip to content

Commit

Permalink
fix(refresher): find parent ion-content properly
Browse files Browse the repository at this point in the history
fixes #14833
  • Loading branch information
manucorporat committed Jul 23, 2018
1 parent cb4acab commit 4eab209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3947,6 +3947,7 @@ declare global {
* If true, the menu is disabled. Default `false`.
*/
'disabled': boolean;
'getWidth': () => number;
'isActive': () => boolean;
'isOpen': () => boolean;
/**
Expand Down
7 changes: 1 addition & 6 deletions core/src/components/refresher/refresher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,7 @@ export class Refresher {
console.error('Make sure you use: <ion-refresher slot="fixed">');
return;
}
const parentElement = this.el.parentElement;
if (!parentElement) {
console.error('ion-refresher is not attached');
return;
}
const contentEl = parentElement.querySelector('ion-content');
const contentEl = this.el.closest('ion-content');
if (contentEl) {
await contentEl.componentOnReady();
this.scrollEl = contentEl.getScrollElement();
Expand Down

0 comments on commit 4eab209

Please sign in to comment.