Skip to content

Commit

Permalink
fix: missing key check on preloaded aliasing
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmardefago committed Apr 4, 2024
1 parent 8df3697 commit e88ee85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/subgraph/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ function executeRegisterNetworksMessage(

if (!cache.isNetworkAlreadyRegistered(chainId)) {
let network = cache.getNetwork(chainId);
network.alias = PRELOADED_ALIASES.get(network.id).toString()
network.alias = PRELOADED_ALIASES.keys().includes(network.id) ? PRELOADED_ALIASES.get(network.id).toString() : ""
network.addedAt = message.id;
network.removedAt = null; // unsetting to make sure that if the network existed before, it's no longer flagged as removed
networks.push(network);
Expand Down

0 comments on commit e88ee85

Please sign in to comment.