Diagnostics for atproto PDS hosts, DIDs, and handles: https://debug.hose.cam

don't break on absent plc op fields

Changed files
+14 -5
+14 -5
index.html
··· 409 409 const log = await res.json(); 410 410 let prev = null; 411 411 for (op of log) { 412 - const opPds = op.operation.services.atproto_pds.endpoint; 412 + let opPds = null; 413 + const services = op.operation.services; 414 + if (services) { 415 + const app = services.atproto_pds; 416 + if (app) { 417 + opPds = app.endpoint; 418 + } 419 + } 413 420 if (opPds === prev) continue; 414 421 prev = opPds; 415 422 this.history.push({ ··· 446 453 let prev = null; 447 454 for (op of log) { 448 455 let opHandle = null; 449 - for (aka of op.operation.alsoKnownAs) { 450 - if (aka.startsWith("at://")) { 451 - opHandle = aka.slice("at://".length); 452 - break; 456 + if (op.operation.alsoKnownAs) { 457 + for (aka of op.operation.alsoKnownAs) { 458 + if (aka.startsWith("at://")) { 459 + opHandle = aka.slice("at://".length); 460 + break; 461 + } 453 462 } 454 463 } 455 464 if (opHandle === prev) continue;