loginWithRedirect() error on mobile

I have a React application. Auth0 login works great on desktop browsers. However, on mobile (my Android; a user’s iOS; my laptop Chrome pretending to be mobile) login does not work. Clicking on the login button gives this error in the Javascript console:

auth0-spa-js.production.esm.js:1 Uncaught (in promise) TypeError: n is not a function
at te.loginWithRedirect (auth0-spa-js.production.esm.js:1:1)

Button looks like so:
<Button
variant=“contained”
color=“primary”
sx={{ ml: 2 }}
onClick={() => loginWithRedirect()}
>
{t(“login”)}

I’m not sure what other parts of my app are useful to share here. As I said, it works great when not on mobile. Googling shows pretty much no one else having this error - I’m really at a loss. Help?

Jessica

Fixed it. There was a separate place where the Button was defined for mobile, and it was passing an object (which was not a function) to loginWithRedirect(). Removed that and all worked.