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

Remove references to implicit globals document and Text #7532

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

silvertech-daniel
Copy link
Contributor

Description

I replaced references to the global document with the doc parameter and new Text with doc.createTextNode. I only found this in the MS Word-generated html preprocessor. This should fix the errors that I hit while running the portable text conversion on certain html in jsdom.

What to review

Double-check that this is a fix of a mistake.

Testing

I have not tested this outside of edits to the package in the node_modules of my project

Notes for release

  • Fixed an edge-case bug in the @sanity/block-tools package's html to portable text preprocessing of word-generated html which broke outside of browsers

Copy link

vercel bot commented Sep 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 20, 2024 2:22pm
performance-studio ✅ Ready (Inspect) Visit Preview Sep 20, 2024 2:22pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Sep 20, 2024 2:22pm

Copy link

vercel bot commented Sep 20, 2024

@silvertech-daniel is attempting to deploy a commit to the Sanity Sandbox Team on Vercel.

A member of the Team first needs to authorize it.

@rexxars
Copy link
Member

rexxars commented Sep 26, 2024

Appreciate the document => doc fixes, but I don't understand the createTextNode => new Text replacement - does JSDom not provide document.createTextNode?

@silvertech-daniel
Copy link
Contributor Author

@rexxars it's the opposite, I replaced new Text with doc.createTextNode

@rexxars
Copy link
Member

rexxars commented Sep 30, 2024

@rexxars it's the opposite, I replaced new Text with doc.createTextNode

My bad! 😅 Thanks for submitting this!

@rexxars rexxars merged commit 306a671 into sanity-io:next Sep 30, 2024
6 of 9 checks passed
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.

2 participants