Issue: Type error for frontMatter.content.sorting data. #145

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

Describe the bug

"Incorrect type. Expected "object".'

image

I think that this is supposed to be an array of objects and not an object itself.

To Reproduce

Add this config data to the frontmatter.json file and see the Problem.

"frontMatter.content.sorting": [
    {
      "title": "Date (asc)",
      "name": "date",
      "order": "asc",
      "type": "date"
    },
    {
      "title": "Date (desc)",
      "name": "date",
      "order": "desc",
      "type": "date"
    },
    {
      "title": "Title (asc)",
      "name": "title",
      "order": "asc",
      "type": "string"
    },
    {
      "title": "Title (desc)",
      "name": "title",
      "order": "desc",
      "type": "string"
    }
  ],

Expected behavior

Not show a Problem with the Array of Objects.

Additional context

Running on GitPod.io, can share the workspace for troubleshooting if needed.

**Describe the bug** `"Incorrect type. Expected "object".'` ![image](https://user-images.githubusercontent.com/30990811/142817040-9622e2bb-6256-4624-a0af-dfa36569b80d.png) I think that this is supposed to be an array of objects and not an object itself. **To Reproduce** Add this config data to the frontmatter.json file and see the Problem. ``` "frontMatter.content.sorting": [ { "title": "Date (asc)", "name": "date", "order": "asc", "type": "date" }, { "title": "Date (desc)", "name": "date", "order": "desc", "type": "date" }, { "title": "Title (asc)", "name": "title", "order": "asc", "type": "string" }, { "title": "Title (desc)", "name": "title", "order": "desc", "type": "string" } ], ``` **Expected behavior** Not show a Problem with the Array of Objects. **Additional context** Running on GitPod.io, can share the workspace for troubleshooting if needed. <!-- github-sync-id:1059763951 -->
adam closed this issue 2026-10-05 02:29:19 +02:00
Author
Owner

This has already been fixed for the upcoming release. 😁

This has already been fixed for the upcoming release. 😁 <!-- github-comment-id:975190034 -->
Author
Owner

Now available in the v5.6.0 release

Now available in the `v5.6.0` release <!-- github-comment-id:977027906 -->
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#145