disqus-react
disqus-react copied to clipboard
Unparseable Color String Causes Disqus Comments to Fail in Next.js Project
Bug Report
Describe the bug
The bug occurs when the parseColor function attempts to parse an unparseable color string in the format oklch(0.9850.002247.839). This results in an error that prevents Disqus comments from appearing in the Next.js project.
To Reproduce
- Navigate to the page with Disqus comments: Go to the page where Disqus comments are supposed to be displayed.
- Trigger the color parsing: The error occurs when the
parseColorfunction is called, likely during the rendering of the Disqus comments section. - Observe the error: The error message indicates that the color string is unparseable, causing the Disqus comments to fail to load.
Expected behavior
The expected behavior is for the parseColor function to correctly parse the color string or handle it gracefully if it is invalid, allowing Disqus comments to load without errors.
Specifications:
- OS: Windows 11
- Package version: Next.js version 15.1.7
- Node version: v22.13.1
Additional context
The error seems to stem from an incorrectly formatted oklch color string. The oklch function expects values for lightness (l), chroma (c), and hue (h), typically separated by spaces. The provided string lacks proper spacing between the values, which might be causing the parsing issue. The correct format should be oklch(l c h / a), where l, c, and h are separated by spaces and a is the optional alpha channel value. I'm not using Daisy.
Just because of a damn style? Grim.
Hi there. Any updates on this?
Is there anything we can do to help?