-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught (in promise) TypeError: Cannot read property 'firstChild' of undefined #8
Comments
I've go the same, apparently, |
I found a possible source for this, at least in my case const node = document.creatElement('<div>');
render(
<LoginDialog
mode={context.mode}
onLogin={options.onLogin}
onLogout={options.onLogout}
passwordRecoveryUrl={options.passwordRecoveryUrl}
/>,
node,
node.firstElementChild as Element
); So, the way I am injecting this is the culprit, Solution const node = document.creatElement('<div>');
node.innerHTML = '<div></div>'; // <------ THIS LINE SOLVES IT, MAKES A firstElementChild exist
render(
<LoginDialog
mode={context.mode}
onLogin={options.onLogin}
onLogout={options.onLogout}
passwordRecoveryUrl={options.passwordRecoveryUrl}
/>,
node,
node.firstElementChild as Element
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't work for me. Failed with this error:
The text was updated successfully, but these errors were encountered: