Skip to content

Commit

Permalink
Line numbers: Fixed null reference (#2605)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Oct 24, 2020
1 parent 093c817 commit 7cdfe55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plugins/line-numbers/prism-line-numbers.js
Expand Up @@ -33,6 +33,9 @@
}

var lineNumberRows = element.querySelector('.line-numbers-rows');
if (!lineNumberRows) {
return;
}
var lineNumberStart = parseInt(element.getAttribute('data-start'), 10) || 1;
var lineNumberEnd = lineNumberStart + (lineNumberRows.children.length - 1);

Expand Down
2 changes: 1 addition & 1 deletion plugins/line-numbers/prism-line-numbers.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7cdfe55

Please sign in to comment.