Skip to content

Commit f1ab07a

Browse files
committed
refactor: use local string for JSON response
1 parent bc473c2 commit f1ab07a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/ApiExplorer.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,13 @@ import { Aside, Icon } from '@astrojs/starlight/components'
240240
const { status } = response
241241
if (status === 200) {
242242
const jsonData = await response.json()
243-
ditto = JSON.stringify(jsonData)
243+
const jsonString = JSON.stringify(jsonData)
244244
const titleName = jsonData.name || pokeApiPath
245245
const title = `Resource for ${titleName}`
246246
pokeapiDirectLink.innerHTML = url
247247
pokeapiDirectLink.href = url
248248

249-
kokiInit(ditto, jsonContainer, title)
249+
kokiInit(jsonString, jsonContainer, title)
250250
} else {
251251
kokiInit('null', jsonContainer, 'Resource not found')
252252
}

0 commit comments

Comments
 (0)