Skip to content

Commit

Permalink
fix: Cannot read property level of undefined (#1357)
Browse files Browse the repository at this point in the history
Co-authored-by: Anix <[email protected]>
  • Loading branch information
sy-records and anikethsaha authored Sep 1, 2020
1 parent f35bf99 commit 4807e58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/render/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class Compiler {
// Remove headers who are under current header
for (
let j = i;
deletedHeaderLevel < toc[j].level && j < toc.length;
j < toc.length && deletedHeaderLevel < toc[j].level;
j++
) {
toc.splice(j, 1) && j-- && i++;
Expand Down

1 comment on commit 4807e58

@vercel
Copy link

@vercel vercel bot commented on 4807e58 Sep 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.