Skip to content

Commit

Permalink
fix: other WebAPIs idx out of bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
toniengelhardt committed Aug 29, 2023
1 parent 9e5b9b8 commit a21d2da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default defineNuxtConfig({
},
experimental: {
componentIslands: true,
headNext: true,
},
modules: [
'@kevinmarrec/nuxt-pwa',
Expand Down
2 changes: 1 addition & 1 deletion pages/apis/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const otherWebAPIs = computed(() => {
const idx = webApiList.value.findIndex(api => api.id === webApiId.value)
const list = [] as WebApi[]
for (let i = idx + 1; i <= idx + 5; i++) {
list.push(webApiList.value.at(i)!)
list.push(webApiList.value.at(i % webApiList.value.length)!)
}
return list
})
Expand Down

0 comments on commit a21d2da

Please sign in to comment.