Skip to content

Commit

Permalink
nits cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bee344 committed Feb 3, 2024
1 parent d84d4f5 commit f22650a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/registry/Registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class Registry {

for (let i = 0; i < chainIds.length; i++) {
const chainInfo = this.currentRelayRegistry[chainIds[i]];
if (chainInfo.tokens !== undefined && chainInfo.tokens.includes(symbol)) {
if (chainInfo.tokens && chainInfo.tokens.includes(symbol)) {
result.push(Object.assign({}, chainInfo, { chainId: chainIds[i] }));
}
}
Expand Down Expand Up @@ -271,7 +271,7 @@ export class Registry {
for (let i = 0; i < paraIds.length; i++) {
const id = paraIds[i];
const chain = this.currentRelayRegistry[id];
if (chain.specName !== undefined && chain.specName.toLowerCase() === specName.toLowerCase()) {
if (chain.specName && chain.specName.toLowerCase() === specName.toLowerCase()) {
this.specNameToIdCache.set(specName, id);
return id;
}
Expand Down

0 comments on commit f22650a

Please sign in to comment.