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

fix api version error #6493

Merged
merged 1 commit into from Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/insomnia/src/ui/routes/project.tsx
Expand Up @@ -877,7 +877,7 @@ const ProjectRoute: FC = () => {
{item.workspace.name}
</Heading>
<div className="flex-1 flex flex-col gap-2 justify-end text-sm text-[--hl]">
{item.spec?.info?.version && (
{typeof item.spec?.info?.version === 'string' && (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if the version can be a number?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the v prefix is trivial ui sugar. Not worth adding more conditions to

<div className="flex-1 pt-2">
{item.spec.info.version.startsWith('v') ? '' : 'v'}
{item.spec.info.version}
Expand Down