Skip to content
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

Using promise for supported languages causes runtime error #145

Open
chrcit opened this issue Jul 6, 2023 · 0 comments
Open

Using promise for supported languages causes runtime error #145

chrcit opened this issue Jul 6, 2023 · 0 comments

Comments

@chrcit
Copy link

chrcit commented Jul 6, 2023

Version: 2.0.1
Error Error: Element type is invalid. Received a promise that resolves to: undefined. Lazy element type must resolve to a class or function.

Screenshot:
CleanShot 2023-07-06 at 11 53 36

Code:

supportedLanguages: (client) =>
  client.fetch(
    `(*[_type == 'siteSettings'][0] {
      "languages": coalesce(languages[], [{
        'id': 'en',
        'title': 'English'
        
      }])
    }).languages`
  ),
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

1 participant