ionic-team/ionic-framework

bug: getting Cannot read properties of undefined (reading 'classList')

Opened this issue · 0 comments

da1z commented

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

Cannot read properties of undefined (reading 'classList')
TypeError: Cannot read properties of undefined (reading 'classList')
at isViewVisible

Expected Behavior

no error, redirect to dashboard page

Steps to Reproduce

const DashboardPage = () => {
    return (
        <IonPage>
            <IonContent>
                <IonList>
                    <IonItem routerLink="/non-existing-route/blasss/sss">
                        <IonLabel>Headers</IonLabel>
                    </IonItem>
                </IonList>
            </IonContent>
        </IonPage>
    );
};
export const App1 = () => {
    return (
        <IonApp>
            <IonReactRouter>
                <IonRouterOutlet>
                    <Route path="/dashboard" component={DashboardPage} />
                    <Route render={() => <Redirect to="/dashboard" />} />
                </IonRouterOutlet>
            </IonReactRouter>
        </IonApp>
    );
};

click on Headers btn

Code Reproduction URL

https://stackblitz.com/edit/s31z8pdq?file=src%2Findex.tsx

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/kirylchetyrbak/.nvm/versions/node/v22.2.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 8.4.0

Capacitor:

Capacitor CLI : 6.1.2
@capacitor/android : 6.2.0
@capacitor/core : 6.2.0
@capacitor/ios : 6.2.0

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v22.2.0 (/Users/kirylchetyrbak/.nvm/versions/node/v22.2.0/bin/node)
npm : 10.7.0
OS : macOS Unknown

Additional Information

No response