try/catch

This commit is contained in:
telackey committed 2024-02-28 19:09:29 -06:00
1 parent ad3e01b2ee
commit b9cdc036ed
2 files changed
+43 -23

No files matched your search

+2 -2
View File
@@ -51,14 +51,14 @@ export class RegHelper {
const records = await this.registry.resolveNames([name]);
for (const r of records) {
// r can be null
if (!r) {
if (r) {
this.cache.set(r.id, r);
if (Array.isArray(r.names)) {
for (const n of r.names) {
this.cache.set(n, r);
}
}
}
}
}
return records[0];
}