r can be null
This commit is contained in:
parent
359607488c
commit
ad3e01b2ee
@ -50,6 +50,8 @@ export class RegHelper {
|
||||
} else {
|
||||
const records = await this.registry.resolveNames([name]);
|
||||
for (const r of records) {
|
||||
// r can be null
|
||||
if (!r) {
|
||||
this.cache.set(r.id, r);
|
||||
if (Array.isArray(r.names)) {
|
||||
for (const n of r.names) {
|
||||
@ -57,6 +59,7 @@ export class RegHelper {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return records[0];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user