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(core): fix error when merging class attributes #4340

Merged
merged 2 commits into from Aug 17, 2023

Conversation

bdbch
Copy link
Contributor

@bdbch bdbch commented Aug 17, 2023

Please describe your changes

This PR fixes an issue that caused a crash in mergeAttributes when one of the value or mergedAttributes is not set.

How did you accomplish your changes

I added checks to the mergeAttribute function that will throw back a fallback value of [].

How have you tested your changes

I tried adding a class in my local demo. I also added a test to check, if the option is set correctly afterwards.

How can we verify your changes

Run the local demo and configure the extension to have a class – it should work without any error throws & the test should run through.

Checklist

  • The changes are not breaking the editor
  • Added tests where possible
  • Followed the guidelines
  • Fixed linting issues

@bdbch bdbch requested a review from svenadlung as a code owner August 17, 2023 15:53
@bdbch bdbch self-assigned this Aug 17, 2023
@netlify
Copy link

netlify bot commented Aug 17, 2023

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit b7f35ea
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/64de428d4302290008359c56
😎 Deploy Preview https://deploy-preview-4340--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 configuration.

@bdbch bdbch merged commit a251946 into main Aug 17, 2023
15 checks passed
@bdbch bdbch deleted the bdbch/fix-link-class-attributes branch August 17, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants