fix: just return 204
This commit is contained in:
@@ -93,7 +93,7 @@ function HoverPreviewInternal({ element, onClose }: Props) {
|
|||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const card = cardRef.current;
|
const card = cardRef.current;
|
||||||
|
|
||||||
if (data && !data.error) {
|
if (data) {
|
||||||
startOpenTimer();
|
startOpenTimer();
|
||||||
|
|
||||||
if (card) {
|
if (card) {
|
||||||
@@ -134,7 +134,7 @@ function HoverPreviewInternal({ element, onClose }: Props) {
|
|||||||
return <LoadingIndicator />;
|
return <LoadingIndicator />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data || data.error) {
|
if (!data) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ router.post(
|
|||||||
|
|
||||||
const data = await Iframely.unfurl(url);
|
const data = await Iframely.unfurl(url);
|
||||||
if (data.error) {
|
if (data.error) {
|
||||||
ctx.response.status = data.status;
|
ctx.response.status = 204;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
ctx.body = presentUnfurl(data);
|
ctx.body = presentUnfurl(data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user