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

Merged
merged 1 commit into from
Dec 15, 2024
Merged

Conversation

shenlu89
Copy link
Contributor

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 Dec 15, 2024 9:48am

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
Contributor 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.

@laymonage laymonage merged commit 06a9bf1 into giscus:main Dec 15, 2024
6 of 7 checks passed
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