From 13201260d64fd1b454f313f3101f189f6bb3e6f7 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 12 Mar 2023 19:23:42 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20weird=20bug=E2=80=A6=20I=20don't=20even?= =?UTF-8?q?=20know=20why=20url=20is=20undefined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/status.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/status.jsx b/src/components/status.jsx index cafa0b8e..af1c9ae6 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -1565,6 +1565,7 @@ function _unfurlMastodonLink(instance, url) { } function nicePostURL(url) { + if (!url) return; const urlObj = new URL(url); const { host, pathname } = urlObj; const path = pathname.replace(/\/$/, '');