Skip to content

Cannot read property 'level' of undefined #1356

Closed

Description

@jesobreira

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)

Activity

  1. sy-records commented on Aug 26, 2020

    @sy-records
    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

  2. sy-records commented on Aug 26, 2020

    @sy-records
    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

  3. self-assigned this
    on Aug 26, 2020
  4. jesobreira commented on Aug 26, 2020

    @jesobreira
    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?

  5. sy-records commented on Aug 26, 2020

    @sy-records
    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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions