Skip to content
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

Show loading spinner until the api attribute is defined #619

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

bjoern-m
Copy link
Contributor

@bjoern-m bjoern-m commented Mar 1, 2023

Description

In some Frameworks the api attribute is not set immediately, which causes <hanko-auth>and <hanko-profile> to throw an error.

Implementation

  • Show the loading spinner until the api attribute is defined.
  • Do not access SDK properties (e.g. via useEffect dependencies) until the frontend-sdk object is available.

@bjoern-m bjoern-m merged commit 5dd1859 into main Mar 2, 2023
@bjoern-m bjoern-m deleted the fix-error-when-api-attribute-is-undefined branch March 2, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants