diff --git a/src/LinkPreview.tsx b/src/LinkPreview.tsx index 094318d..098b2ae 100644 --- a/src/LinkPreview.tsx +++ b/src/LinkPreview.tsx @@ -68,7 +68,11 @@ export const LinkPreview = React.memo( React.useEffect(() => { let isCancelled = false - if (previewData) return setData(previewData) + if (previewData) { + setData(previewData) + return + } + const fetchData = async () => { setData(undefined) const newData = await getPreviewData(text)