@ionic/react 9.0.7-nightly.20261005 → 9.0.7-nightly.20261006

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2193,7 +2193,13 @@ class OutletPageManager extends React.Component {
2193
2193
  * when React unmounts + remounts components.
2194
2194
  */
2195
2195
  if (!this.outletIsReady) {
2196
- componentOnReady(this.ionRouterOutlet, () => {
2196
+ const el = this.ionRouterOutlet;
2197
+ componentOnReady(el, () => {
2198
+ /**
2199
+ * The outlet can unmount before this fires, which clears the ref.
2200
+ */
2201
+ if (this.ionRouterOutlet !== el)
2202
+ return;
2197
2203
  /**
2198
2204
  * Guard against duplicate callbacks from React strict mode double-mount.
2199
2205
  * Both componentDidMount calls pass the outer !outletIsReady check before
@@ -2212,7 +2218,6 @@ class OutletPageManager extends React.Component {
2212
2218
  * outlet's forward animation removes ion-page-invisible, preventing
2213
2219
  * a flash where the outlet is briefly visible at full opacity.
2214
2220
  */
2215
- const el = this.ionRouterOutlet;
2216
2221
  if (!el.classList.contains('ion-page-invisible') && !el.classList.contains('ion-page-hidden')) {
2217
2222
  el.classList.add('ion-page');
2218
2223
  el.classList.add('ion-page-invisible');