X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fjob-queue%2Fhandlers%2Factivitypub-cleaner.ts;h=a25f00b0a8491dad5ead3ac7013940d00a0e4a56;hb=26818a73ba0d7fd53ca69eba0c8e525f3670b5a8;hp=84c0a2de2bcafb9486782e41b553524daefee3b9;hpb=5a921e7b74910414626bfc9672b857e987e3ebed;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/job-queue/handlers/activitypub-cleaner.ts b/server/lib/job-queue/handlers/activitypub-cleaner.ts index 84c0a2de2..a25f00b0a 100644 --- a/server/lib/job-queue/handlers/activitypub-cleaner.ts +++ b/server/lib/job-queue/handlers/activitypub-cleaner.ts @@ -88,7 +88,7 @@ async function updateObjectIfNeeded (options: { const { body } = await doJSONRequest(url, { activityPub: true }) // If not same id, check same host and update - if (!body || !body.id || !bodyValidator(body)) throw new Error(`Body or body id of ${url} is invalid`) + if (!body?.id || !bodyValidator(body)) throw new Error(`Body or body id of ${url} is invalid`) if (body.type === 'Tombstone') { return on404OrTombstone()