Open Arthurk12 opened 1 year ago
👋 @Arthurk12
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
toPNG
function throws an error when there is nostyleSheets
attribute in theownerDocument
node. It tries to iterate over a non-existent attribute.Expected Behavior
The image should bypass the stylesheets when there is no
styleSheets
attribute.Current Behavior
Throws an error and fails.
Possible Solution
Add an extra check inside the parseWebFontRules
Steps To Reproduce
Error Message & Stack Trace
```txt error ReferenceError: __spreadArray is not defined getCurrentValue https://.../html5client/join line 259351 > injectedScript:144 proxyDocumentStyleSheets https://.../html5client/join line 259351 > injectedScript:161 parseWebFontRules https://.../html5client/packages/modules.js parseWebFontRules https://.../html5client/packages/modules.js __awaiter https://.../html5client/packages/modules.js __awaiter https://.../html5client/packages/modules.js parseWebFontRules https://.../html5client/packages/modules.js component.jsx:207:22 ```
Additional Context
This happens when I enable dark mode in the website and then try to generate the image.