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 undefined 'value' error in showPreview method #1604

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matejbrodziansky
Copy link

@matejbrodziansky matejbrodziansky commented Aug 29, 2024

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
New tests added? yes
Fixed tickets
License MIT

Description

[Description of the bug or feature]

Summary:
This pull request fixes a TypeError encountered in the showPreview method of medium-editor.js. The error occurred because the code attempted to access the value property of undefined when href attribute was missing.

Details:

  • Added a check to ensure hrefAttribute exists before accessing its value property.
  • This prevents runtime errors and improves stability.

image

--

Please, don't submit /dist files with your PR!

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.

1 participant