From ccecc16a2c57a04c9091fd718180a5ba3526b8e4 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 21 Dec 2023 00:36:55 +0800 Subject: [PATCH] Fix undefined statusObject --- src/pages/http-route.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/http-route.jsx b/src/pages/http-route.jsx index f3189f1a..46290d07 100644 --- a/src/pages/http-route.jsx +++ b/src/pages/http-route.jsx @@ -21,11 +21,10 @@ export default function HttpRoute() { useLayoutEffect(() => { setUIState('loading'); (async () => { - const { instance, id } = statusObject; - const { masto } = api({ instance }); - // Check if status returns 200 try { + const { instance, id } = statusObject; + const { masto } = api({ instance }); const status = await masto.v1.statuses.$select(id).fetch(); if (status) { window.location.hash = statusURL + '?view=full';