Fix profile URLs not working for http route

This commit is contained in:
Lim Chee Aun 2024-08-01 20:18:44 +08:00
parent 57db8778a4
commit 818f58b460

View file

@ -24,11 +24,13 @@ export default function HttpRoute() {
// Check if status returns 200 // Check if status returns 200
try { try {
const { instance, id } = statusObject; const { instance, id } = statusObject;
const { masto } = api({ instance }); if (id) {
const status = await masto.v1.statuses.$select(id).fetch(); const { masto } = api({ instance });
if (status) { const status = await masto.v1.statuses.$select(id).fetch();
window.location.hash = statusURL + '?view=full'; if (status) {
return; window.location.hash = statusURL + '?view=full';
return;
}
} }
} catch (e) {} } catch (e) {}