Skip to content

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

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

Closed
iveptawebadmin opened this issue Nov 22, 2021 · 2 comments
Closed

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

iveptawebadmin opened this issue Nov 22, 2021 · 2 comments
Milestone

Comments

@iveptawebadmin
Copy link

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.

@estruyf
Copy link
Owner

estruyf commented Nov 22, 2021

This has already been fixed for the upcoming release. 😁

@estruyf estruyf added this to the 5.6.0 milestone Nov 22, 2021
estruyf added a commit that referenced this issue Nov 22, 2021
@estruyf estruyf mentioned this issue Nov 23, 2021
@estruyf
Copy link
Owner

estruyf commented Nov 23, 2021

Now available in the v5.6.0 release

@estruyf estruyf closed this as completed Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants