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

Bug | Pseudo Check (Sanity required) #105

Open
clizSec opened this issue Jul 7, 2021 · 0 comments
Open

Bug | Pseudo Check (Sanity required) #105

clizSec opened this issue Jul 7, 2021 · 0 comments

Comments

@clizSec
Copy link

clizSec commented Jul 7, 2021

At the pseudoCheck.js library's code, at line 25, need to add an extra sanity (or before), as stylesheet like the following below, will break it:

<style>, something { font-size: 12px; } p { font-color: red; } a { margin: 0.1em; }</style>

This is because of the comma (,) before the something element is presented with his styles, the library will try to parse that, and will return an array with first element index as empty string, and second, with the CSS object structure.

Screenshot explained:

webstorm64_t3HxuRRRjD
inline-css.js

With an error of:

TypeError: Cannot read property 'length' of undefined
    at module.exports (D:\XYZ\WebstormProjects\TestApp\node_modules\inline-css\lib\pseudoCheck.js:27:36)
    at D:\XYZ\WebstormProjects\TestApp\node_modules\inline-css\lib\inline-css.js:72:26
    at Array.forEach (<anonymous>)
    at module.exports (D:\XYZ\WebstormProjects\TestApp\node_modules\inline-css\lib\inline-css.js:68:11)
    at D:\WebstormProjects\TestApp\node_modules\inline-css\lib\inlineContent.js:22:27
    at D:\XYZ\WebstormProjects\TestApp\node_modules\extract-css\index.js:37:16
    at D:\XYZ\WebstormProjects\TestApp\node_modules\batch\index.js:161:14
    at processTicksAndRejections (internal/process/task_queues.js:79:11)

webstorm64_xg6NRJjpMd
pseudoCheck.js

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

No branches or pull requests

1 participant