Skip to content

Commit 4807e58

Browse files
fix: Cannot read property level of undefined (#1357)
Co-authored-by: Anix <[email protected]>
1 parent f35bf99 commit 4807e58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/render/compiler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export class Compiler {
279279
// Remove headers who are under current header
280280
for (
281281
let j = i;
282-
deletedHeaderLevel < toc[j].level && j < toc.length;
282+
j < toc.length && deletedHeaderLevel < toc[j].level;
283283
j++
284284
) {
285285
toc.splice(j, 1) && j-- && i++;

0 commit comments

Comments
 (0)