Skip to content

Conversation

@jhsong233
Copy link

The example used await getLogtoContext() inside a normal function, which caused a TypeScript error:
'await' expressions are only allowed within async functions and at the top levels of modules (TS1308).

Fixed by marking the Home component as async.

Summary

Copy link
Member

@charIeszhao charIeszhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

The example used `await getLogtoContext()` inside a normal function,
which caused a TypeScript error (TS1308). 'await' expressions are only
allowed within async functions and at the top levels of modules.

Marking the Home component as async resolves the error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants