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

Error: Unable to parse color #291

Open
SkepticMystic opened this issue May 3, 2024 · 3 comments
Open

Error: Unable to parse color #291

SkepticMystic opened this issue May 3, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@SkepticMystic
Copy link

I'm not immediately sure what causes the issue, but I get this on certain pages. Rango appears to continue works as normal.

Uncaught (in promise) Error: Unable to parse color from string: rgb(9, NaN, NaN)
    at new vr (content.65d0fa3e.js:15008:29)
    at dh.computeColors (content.65d0fa3e.js:20600:20)
    at dh.applyDefaultStyle (content.65d0fa3e.js:20710:12)
    at new dh (content.65d0fa3e.js:20567:37)
    at Ph.intersect (content.65d0fa3e.js:20945:92)
    at hh.Sh [as callback] (content.65d0fa3e.js:20865:37)
@david-tejada
Copy link
Owner

Can you share a page where this happens?

@SkepticMystic
Copy link
Author

Sorry, I should have done that in the first place!
I don't remember atm, but I'll keep an eye out for the error again, and share the url

@david-tejada
Copy link
Owner

I think it has to do with the rgbaToRgb function here: https://github.com/david-tejada/rango/blob/main/src/content/utils/getEffectiveBackgroundColor.ts#L1C1-L17C2

The call to Number.parseFloat must be returning NaN under some circumstances. Let me know if you come across it again.

@david-tejada david-tejada added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants