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

Vision tool crashes when selecting other api version in translated Studio. #5432

Closed
jorngeorg opened this issue Jan 2, 2024 · 1 comment · Fixed by #5433
Closed

Vision tool crashes when selecting other api version in translated Studio. #5432

jorngeorg opened this issue Jan 2, 2024 · 1 comment · Fixed by #5433

Comments

@jorngeorg
Copy link
Contributor

This is due to the change handler relying on the value of api version field being English – "other". While in a translated Studio it can be any value.

if (apiVersion?.toLowerCase() === 'other') {
...
}

https://github.com/sanity-io/sanity/blob/a63a20a2430345af74cb5cc060d6d20a70ffa91a/packages/%40sanity/vision/src/components/VisionGui.tsx#L394C39-L394C39

To reproduce:

  1. Open a studio and select any other language that English
  2. Open the Vision plugin
  3. Try selecting "other" api version
  4. The plugin crashes with the error Error: Invalid API version string, expected 1 or date in format YYYY-MM-DD
  5. The plugin will crash until you delete the localStorage value
Copy link
Contributor

github-actions bot commented Apr 4, 2024

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant