From 83db9cd2bc355566333a0c0d2d1c0f00d21ab213 Mon Sep 17 00:00:00 2001 From: ccbikai Date: Fri, 6 Dec 2024 13:49:58 +0800 Subject: [PATCH] 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. --- components/dashboard/links/Index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dashboard/links/Index.vue b/components/dashboard/links/Index.vue index 35b6611..3409459 100644 --- a/components/dashboard/links/Index.vue +++ b/components/dashboard/links/Index.vue @@ -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