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.
This commit is contained in:
parent
09cae1b588
commit
83db9cd2bc
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ async function getLinks() {
|
|||
const data = await useAPI('/api/link/list', {
|
||||
query: {
|
||||
limit,
|
||||
cursor,
|
||||
cursor: cursor || undefined,
|
||||
},
|
||||
})
|
||||
links.value = links.value.concat(data.links).filter(Boolean) // Sometimes cloudflare will return null, filter out
|
||||
|
|
|
|||
Loading…
Reference in a new issue