From b45664f8b23b92250396a030ddfb62b2a0afefb2 Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 21 Dec 2025 22:15:47 -0500 Subject: [PATCH] don't break on absent plc op fields --- index.html | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index c6de287..229fbd0 100644 --- a/index.html +++ b/index.html @@ -409,7 +409,14 @@ const log = await res.json(); let prev = null; for (op of log) { - const opPds = op.operation.services.atproto_pds.endpoint; + let opPds = null; + const services = op.operation.services; + if (services) { + const app = services.atproto_pds; + if (app) { + opPds = app.endpoint; + } + } if (opPds === prev) continue; prev = opPds; this.history.push({ @@ -446,10 +453,12 @@ let prev = null; for (op of log) { let opHandle = null; - for (aka of op.operation.alsoKnownAs) { - if (aka.startsWith("at://")) { - opHandle = aka.slice("at://".length); - break; + if (op.operation.alsoKnownAs) { + for (aka of op.operation.alsoKnownAs) { + if (aka.startsWith("at://")) { + opHandle = aka.slice("at://".length); + break; + } } } if (opHandle === prev) continue; -- 2.51.2