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

fix(extension/link): fix last word value being undefined #3258

Merged
merged 1 commit into from Sep 30, 2022

Conversation

bdbch
Copy link
Contributor

@bdbch bdbch commented Sep 30, 2022

This PR fixes the lastWordBeforeSpace value to not be passed through the autolink plugin when it is undefined. This can happen, when the filtered wordBeforeWhitespace array has a length of 0 since lastWordBeforeSpace is set to wordsBeforeWhitespace.length - 1 which would result in an index of -1.

@netlify
Copy link

netlify bot commented Sep 30, 2022

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit dd58fbf
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/633656af76fb5b00081bd45d
😎 Deploy Preview https://deploy-preview-3258--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@bdbch bdbch changed the title fix(extension/link): 🐛 fix last word value being undefined fix(extension/link): fix last word value being undefined Sep 30, 2022
@bdbch bdbch merged commit 69923e2 into main Sep 30, 2022
@bdbch bdbch deleted the 3254-extension-link-error branch September 30, 2022 02:40
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.

None yet

1 participant