Skip to content

Commit

Permalink
Fix profile URLs not working for http route
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Aug 1, 2024
1 parent 57db877 commit 818f58b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/pages/http-route.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ export default function HttpRoute() {
// 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';
return;
if (id) {
const { masto } = api({ instance });
const status = await masto.v1.statuses.$select(id).fetch();
if (status) {
window.location.hash = statusURL + '?view=full';
return;
}
}
} catch (e) {}

Expand Down

0 comments on commit 818f58b

Please sign in to comment.