nicolium: fix report page crash, also wtf
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@@ -1476,7 +1476,7 @@ const StatusActionBar: React.FC<IStatusActionBar> = ({
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (!status) {
|
||||
if (!status || !status.account) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,11 @@ import { adminAccountSchema } from './account';
|
||||
const adminReportSchema = v.pipe(
|
||||
v.any(),
|
||||
v.transform((report: any) => {
|
||||
report.statuses = report.statuses?.map((status: any) => ({
|
||||
...status,
|
||||
account: (report.actor ? report.account : report.target_account)?.account || status.account,
|
||||
}));
|
||||
|
||||
if (report.actor) {
|
||||
/**
|
||||
* Convert Pleroma report schema
|
||||
|
||||
Reference in New Issue
Block a user