Skip to content

flowchart Bug: Cannot read properties of undefined (reading 'shape') Syntax error in text mermaid version 11.6.0 #6662

@one2ndpiece

Description

@one2ndpiece

Description

Cannot read properties of undefined (reading 'shape') Syntax error in text mermaid version 11.6.0

Steps to reproduce

VSCode
Github
mermaid version 11.6.0
This code is broken, I don't know why.

flowchart
    subgraph asub
        aa
    end
   a
    subgraph bsub
        subgraph csub
            subgraph dsub
                da
            end
        end
        subgraph esub
            subgraph fsub
                %%comment out subgraph below
                subgraph gsub
                    ga
                end
            end
        end
    end

    %%comment out below
    bsub-->a

    %%comment out below
    da-->a
Loading

This is OK
Commented out
subgraph gsub
ga
end

flowchart
    subgraph asub
        aa
    end
   a
    subgraph bsub
        subgraph csub
            subgraph dsub
                da
            end
        end
        subgraph esub
            subgraph fsub
                %%comment out subgraph below
                %%subgraph gsub
                    %%ga
                %%end
            end
        end
    end

    %%comment out below
    bsub-->a

    %%comment out below
    da-->a
Loading

This is OK
Commented out
bsub-->a

flowchart
    subgraph asub
        aa
    end
   a
    subgraph bsub
        subgraph csub
            subgraph dsub
                da
            end
        end
        subgraph esub
            subgraph fsub
                %%comment out subgraph below
                subgraph gsub
                    ga
                end
            end
        end
    end

    %%comment out below
    %%bsub-->a

    %%comment out below
    da-->a
Loading

This is OK
Commented out
da-->a

flowchart
    subgraph asub
        aa
    end
   a
    subgraph bsub
        subgraph csub
            subgraph dsub
                da
            end
        end
        subgraph esub
            subgraph fsub
                %%comment out subgraph below
                subgraph gsub
                    ga
                end
            end
        end
    end

    %%comment out below
    bsub-->a

    %%comment out below
    %%da-->a
Loading

Screenshots

Image

Code Sample

flowchart
    subgraph asub
        aa
    end
   a
    subgraph bsub
        subgraph csub
            subgraph dsub
                da
            end
        end
        subgraph esub
            subgraph fsub
                %%comment out subgraph below
                subgraph gsub
                    ga
                end
            end
        end
    end

    %%comment out below
    bsub-->a

    %%comment out below
    da-->a

Setup

  • Mermaid version:11.6.0
  • Browser and Version: [Chrome]
  • VSCode
  • Github

Suggested Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

Type: Bug / ErrorSomething isn't working or is incorrect

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions