Issue: "Cannot read property 'write' of undefined" with specific markdown. #218

Closed
opened 2026-10-05 02:34:15 +02:00 by adam · 2 comments
Owner

Describe the bug
Some files don't load in FM editor if they contain specific markdown for lists.

To Reproduce
Steps to reproduce the behavior:

  • Open a md file in FM Dashboard.
  • Enter following markdown wherever you want inside body of content file.:

- This is a weird list.
- - An item that's indented by 2 "- ".
- - Another item that's indented by 2 "- ".

  • Save the file.

  • Go back to FM Dashboard.

  • Click again on file name.

  • The file tabulator displays the content.

  • The FM sidebar is loading endlessly (3 animated dots).

  • Go to Etensions > "Front Matter"

  • See tab "Runtime Status". Each time you perform the steps above, another entry appears:

Cannot read property 'write' of undefined

Expected behavior
FM sidebar loads even if the markdown code above is to be questioned. TBH: I don't know if that's invalid markdown code. Until today we hadn't issues with it.

Desktop (please complete the following information):

  • OS: Win10
  • VSCode: 1.64.2
  • Front Matter v6.1.0
**Describe the bug** Some files don't load in FM editor if they contain specific markdown for lists. **To Reproduce** Steps to reproduce the behavior: - Open a md file in FM Dashboard. - Enter following markdown wherever you want inside body of content file.: ``` - This is a weird list. - - An item that's indented by 2 "- ". - - Another item that's indented by 2 "- ". ``` - Save the file. - Go back to FM Dashboard. - Click again on file name. - The file tabulator displays the content. - The FM sidebar is loading endlessly (3 animated dots). - Go to Etensions > "Front Matter" - See tab "Runtime Status". Each time you perform the steps above, another entry appears: ``` Cannot read property 'write' of undefined ``` **Expected behavior** FM sidebar loads even if the markdown code above is to be questioned. TBH: I don't know if that's invalid markdown code. Until today we hadn't issues with it. **Desktop (please complete the following information):** - OS: Win10 - VSCode: 1.64.2 - Front Matter v6.1.0 <!-- github-sync-id:1157378540 -->
adam closed this issue 2026-10-05 02:34:15 +02:00
Author
Owner

Behaviour is a bit different on my end, but I've been able to reproduce it. It seems to be an issue with the - - tags. As you create two list items on the same line.

image

The right syntax should be:

- This is a weird list.
  - An item that's indented by 2 "- ".
  - Another item that's indented by 2 "- ".

For the SEO details, we get the Markdown syntax tree and this is where it fails. To make sure that it doesn't prevent the rendering of the panel, I implement a fix for this.

Behaviour is a bit different on my end, but I've been able to reproduce it. It seems to be an issue with the `- -` tags. As you create two list items on the same line. ![image](https://user-images.githubusercontent.com/2900833/156411848-79c06dc2-dccd-4fbd-8c08-8030bcc2f268.png) The right syntax should be: ``` - This is a weird list. - An item that's indented by 2 "- ". - Another item that's indented by 2 "- ". ``` For the SEO details, we get the Markdown syntax tree and this is where it fails. To make sure that it doesn't prevent the rendering of the panel, I implement a fix for this. <!-- github-comment-id:1057167420 -->
Author
Owner

Fix will be available in version v6.1.1

Fix will be available in version `v6.1.1` <!-- github-comment-id:1057178161 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#218