Skip to content

Commit 83db9cd

Browse files
committed
fix: Fixes cursor handling for API link requests
Replaces the cursor value in the API request with `undefined` if it is falsy. This prevents potential issues with null values being sent in the query, ensuring a more reliable API interaction. Improves overall stability when fetching link data from the server.
1 parent 09cae1b commit 83db9cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/dashboard/links/Index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function getLinks() {
1111
const data = await useAPI('/api/link/list', {
1212
query: {
1313
limit,
14-
cursor,
14+
cursor: cursor || undefined,
1515
},
1616
})
1717
links.value = links.value.concat(data.links).filter(Boolean) // Sometimes cloudflare will return null, filter out

0 commit comments

Comments
 (0)