Skip to content

fix: prevent crash on jsdom when preloading CSSOM#3754

Merged
straker merged 2 commits intodequelabs:developfrom
AriPerkkio:fix/jsdom-mediaquery-crash
Nov 1, 2022
Merged

fix: prevent crash on jsdom when preloading CSSOM#3754
straker merged 2 commits intodequelabs:developfrom
AriPerkkio:fix/jsdom-mediaquery-crash

Conversation

@AriPerkkio
Copy link
Copy Markdown
Contributor

@AriPerkkio AriPerkkio commented Oct 28, 2022

  • cssom package does not implement StyleSheet.media

<< Describe the changes >>

Adds a simple if to check whether StyleSheet has media.

Closes #3753

@AriPerkkio AriPerkkio requested a review from a team as a code owner October 28, 2022 12:11
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Oct 28, 2022

CLA assistant check
All committers have signed the CLA.

@stephenmathieson
Copy link
Copy Markdown
Member

The fix LGTM. I don't understand what's going on with CI though.

@straker
Copy link
Copy Markdown
Contributor

straker commented Oct 31, 2022

Thanks for the pr. Could you try pushing an empty commit to see if that fixes the checks?

git commit -m "trigger build" --allow-empty

- cssom package does not implement StyleSheet.media
@AriPerkkio
Copy link
Copy Markdown
Contributor Author

AriPerkkio commented Oct 31, 2022

I used the commit --amend to get new commit for re-triggering the build instead of --allow-empty - now the PR approval resetted. 🙃

@stephenmathieson could you re-approve so we'll see if CI is now stable?

@AriPerkkio
Copy link
Copy Markdown
Contributor Author

The CI seems to remain stuck. Any ideas what's going on?
As resetting the commits did not fix the CI, should I just create a new PR?

@straker
Copy link
Copy Markdown
Contributor

straker commented Nov 1, 2022

Unfortunately I don't know what's going on with Circle. I've looked around but it seems the only answer is to contact Circle support and see if they can fix it. Before I do that though, I'm going to try committing to your pr and see if that triggers the build.

@straker
Copy link
Copy Markdown
Contributor

straker commented Nov 1, 2022

Well that seems to have worked.

@straker
Copy link
Copy Markdown
Contributor

straker commented Nov 1, 2022

Reviewed for security

@straker straker changed the title fix: prevent crash on jsdom fix: prevent crash on jsdom when preloading CSSOM Nov 1, 2022
@straker straker merged commit b1f0c6b into dequelabs:develop Nov 1, 2022
@AriPerkkio AriPerkkio deleted the fix/jsdom-mediaquery-crash branch November 1, 2022 15:37
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

Successfully merging this pull request may close these issues.

getStylesheetsFromDocument crash on JSDOM: TypeError: Cannot read properties of undefined (reading 'mediaText')

4 participants