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(line-numbers): lineNumberWrapper might be null when code is "" #2337

Merged
merged 1 commit into from Apr 29, 2020
Merged

fix(line-numbers): lineNumberWrapper might be null when code is "" #2337

merged 1 commit into from Apr 29, 2020

Conversation

lynette-li
Copy link
Contributor

When code is "" or undefined or null,the following error occurs when resizing the window because the element of ".line-numbers-rows" is null.

image

@RunDevelopment RunDevelopment merged commit 4b61661 into PrismJS:master Apr 29, 2020
@RunDevelopment
Copy link
Member

Thank you for contributing @lynette-li!

quentinvernot pushed a commit to TankerHQ/prismjs that referenced this pull request Sep 11, 2020
…#2337)

If a code block doesn't contain code, line numbers will not be added but the resize event still expected them to be there resulting in a TypeError.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants