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

Cannot read property 'level' of undefined #1356

Closed
1 task done
jesobreira opened this issue Aug 25, 2020 · 4 comments · Fixed by #1357
Closed
1 task done

Cannot read property 'level' of undefined #1356

jesobreira opened this issue Aug 25, 2020 · 4 comments · Fixed by #1357
Assignees
Labels

Comments

@jesobreira
Copy link

Bug Report

Steps to reproduce

Run the following README.md:

# Heading 1

Test

## Heading 2

### Heading 3A

Lorem ipsum

#### Heading 4A

##### Heading 5A

Lorem ipsum

### Heading 3B

Lorem ipsum

#### Heading 4B <!-- {docsify-ignore} -->

##### Heading 5B

Lorem ipsum

What is current behaviour

The sidebar does not show up and the console shows:


```docsify.min.js:1 Uncaught TypeError: Cannot read property 'level' of undefined
    at $n.sidebar (docsify.min.js:1)
    at Vn.Xn._renderSidebar (docsify.min.js:1)
    at Vn.Pn (docsify.min.js:1)
    at docsify.min.js:1
    at o (docsify.min.js:1)
    at B (docsify.min.js:1)
    at t (docsify.min.js:1)
    at docsify.min.js:1
    at docsify.min.js:1
    at docsify.min.js:1

What is the expected behaviour

Sidebar shows up

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: macOS Catalina

  • Node.js version: 12.18.3

  • npm/yarn version: 6.14.6

  • Browser version: Chrome Version 84.0.4147.135 (Official Build) (64-bit)

  • Docsify version: 4.11.6

  • Docsify plugins: none

Please create a reproducible sandbox

Code Sandbox

Mention the docsify version in which this bug was not present (if any)

@sy-records
Copy link
Member

I can't reproduce your question.

The README.md will not show up in the sidebar, you need to add - [README](README.md) to _sidebar.md

image

@sy-records
Copy link
Member

#1355 (comment) As with this one, you need to add configuration items.

Cannot read property 'level' of undefined

This is an exception message that we can optimize

@jesobreira
Copy link
Author

I'm not using a custom _sidebar.md, rather I'm trying to use the auto-generated table of contents. Does it make any difference?

@sy-records
Copy link
Member

No problem, here's a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants