mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
refactor(nav): make transition fall back to original element
This commit is contained in:
@ -63,5 +63,11 @@ function getIonPageElement(element: HTMLElement) {
|
||||
if (element.tagName.toLowerCase() === 'ion-page') {
|
||||
return element;
|
||||
}
|
||||
return element.querySelector('ion-page');
|
||||
const ionPage = element.querySelector('ion-page');
|
||||
if (ionPage) {
|
||||
return ionPage;
|
||||
}
|
||||
|
||||
// idk, return the original element so at least something animates and we don't have a null pointer
|
||||
return element;
|
||||
}
|
||||
|
Reference in New Issue
Block a user