mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-13 09:28:50 +01:00
Fix undefined statusObject
This commit is contained in:
parent
7b246fc660
commit
ccecc16a2c
1 changed files with 2 additions and 3 deletions
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue