mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 01:48: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(() => {
|
useLayoutEffect(() => {
|
||||||
setUIState('loading');
|
setUIState('loading');
|
||||||
(async () => {
|
(async () => {
|
||||||
const { instance, id } = statusObject;
|
|
||||||
const { masto } = api({ instance });
|
|
||||||
|
|
||||||
// Check if status returns 200
|
// Check if status returns 200
|
||||||
try {
|
try {
|
||||||
|
const { instance, id } = statusObject;
|
||||||
|
const { masto } = api({ instance });
|
||||||
const status = await masto.v1.statuses.$select(id).fetch();
|
const status = await masto.v1.statuses.$select(id).fetch();
|
||||||
if (status) {
|
if (status) {
|
||||||
window.location.hash = statusURL + '?view=full';
|
window.location.hash = statusURL + '?view=full';
|
||||||
|
|
Loading…
Reference in a new issue