Skip to content

Commit

Permalink
fix: apix fix (#785)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryans99 authored Aug 5, 2021
1 parent b2487ea commit 5ecea27
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/extension-api-explorer/src/ExtensionApiExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ export const ExtensionApiExplorer: FC = () => {
const content = await sdk.ok(sdk.api_spec(version, name))
// TODO switch this to just call const api = ApiModel.fromString(content) now
// TODO I think we can remove this this crazy step now that the api_spec endpoint is cleaner
let json = JSON.parse(content)
if (typeof json === 'string') {
json = JSON.parse(json)
let json
if (typeof content === 'string') {
json = JSON.parse(content)
} else {
json = content
}
json = upgradeSpecObject(json)
const api = ApiModel.fromJson(json)
Expand Down

0 comments on commit 5ecea27

Please sign in to comment.