Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

update comments

Steven Tey6fac9dc6717c
diff --git a/apps/web/ui/modals/link-builder/use-metatags.ts b/apps/web/ui/modals/link-builder/use-metatags.ts
index 94ada5d507..e25bf6bc68 100644
--- a/apps/web/ui/modals/link-builder/use-metatags.ts
+++ b/apps/web/ui/modals/link-builder/use-metatags.ts
@@ -37,12 +37,10 @@ export function useMetatags({
return;
}
- /**
- * Only generate metatags if enabled (modal is open and url is not empty)
- **/
+ // Only generate metatags if enabled (modal is open and url is not empty)
if (enabled) {
try {
- // if url is valid, continue to generate metatags, else return null
+ // if url is valid, continue to generate metatags, else throw error and return null
new URL(debouncedUrl);
setGeneratingMetatags(true);
fetch(`/api/metatags?url=${debouncedUrl}`).then(async (res) => {