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

common: update and simplify code #1987

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shenlu89
Copy link

Update and simplify code in Giscus.tsx file

Copy link

vercel bot commented Feb 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
giscus-component ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2024 10:23am

Comment on lines 29 to 33
if (!mounted) return null;

return (
<giscus-widget
id={id}
Copy link
Member

Choose a reason for hiding this comment

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

Thanks, but this wraps the component in a fragment unnecessarily. I'd much prefer the old explicit return null.

Copy link
Author

Choose a reason for hiding this comment

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

OK, I revert to old explicit return null in 7286aeb.

Revert to old explicit `return null`.
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.

2 participants