The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Handle "unsorted" folderId
Tim Wilson7d41789445e6
diff --git a/apps/web/ui/modals/link-builder/index.tsx b/apps/web/ui/modals/link-builder/index.tsxindex 35b09d224b..0eb02a878c 100644--- a/apps/web/ui/modals/link-builder/index.tsx+++ b/apps/web/ui/modals/link-builder/index.tsx@@ -247,11 +247,16 @@ function LinkBuilderInner({ref={formRef}onSubmit={handleSubmit(async (data) => {// @ts-ignore – exclude extra attributes from `data` object before sending to API- const { user, tags, tagId, ...rest } = data;+ const { user, tags, tagId, folderId, ...rest } = data;const bodyData = {...rest,+// Map tags to tagIdstagIds: tags.map(({ id }) => id),++ // Replace "unsorted" folder ID w/ null+ folderId: folderId === "unsorted" ? null : folderId,+// Manually reset empty strings to nullexpiredUrl: rest.expiredUrl || null,ios: rest.ios || null,