-
Notifications
You must be signed in to change notification settings - Fork 15
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
document.querySelector throws error with bad selector #300
Comments
@steveworkman: can you provide a failing testcase for this? i tried to add a test case but the only way i could trigger this kind of error was by providing an invalid selector. Passing I also tried this using |
Experiencing the same problem while trying to use critical in our project to inline the above-the-fold css. When
Apparently the code is failing over the same file and lines that @steveworkman referenced above in the |
I've replicated the issue and it's related to my own project having To resolve, we'd need to pin the version of |
This library is being run via rollup-plugin-critical -> critical -> inline-critical
When trying to generate an inline stylesheet, the code falls over at https://github.com/bezoerb/inline-critical/blob/main/index.js#L80-L81 with an error of:
This isn't the selector being passed in (that would be
:not(noscript) > [rel="stylesheet"]
) but somewhere around thenwsapi
it gets mangled and comes out as a bad selector.If I comment out these selectors in the code, it works. Adding a selector as an option has no effect as all selectors are evaluated.
The text was updated successfully, but these errors were encountered: