Skip to content

Commit

Permalink
fix(vision): fixes an issue where selection other would crash (#5377)
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 authored and juice49 committed Dec 17, 2023
1 parent 74fc046 commit ed5efa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@sanity/vision/src/components/VisionGui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export class VisionGui extends React.PureComponent<VisionGuiProps, VisionGuiStat

handleChangeApiVersion(evt: ChangeEvent<HTMLSelectElement>) {
const apiVersion = evt.target.value
if (apiVersion === 'other') {
if (apiVersion?.toLowerCase() === 'other') {
this.setState({customApiVersion: 'v'}, () => {
this._customApiVersionElement.current?.focus()
})
Expand Down Expand Up @@ -790,6 +790,7 @@ export class VisionGui extends React.PureComponent<VisionGuiProps, VisionGuiStat
<SplitpaneContainer flex="auto">
{/* @ts-expect-error: https://github.com/tomkp/react-split-pane/pull/819 */}
<SplitPane
// eslint-disable-next-line @sanity/i18n/no-attribute-string-literals
split={narrowBreakpoint() ? 'vertical' : 'horizontal'}
minSize={280}
defaultSize={400}
Expand Down

0 comments on commit ed5efa4

Please sign in to comment.