Skip to content

Commit

Permalink
added null check on array
Browse files Browse the repository at this point in the history
  • Loading branch information
mark committed Aug 25, 2022
1 parent 54530fd commit 861f819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gumdrop/src/utils/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const envFor = (connection: Connection): string => {
const endpoint = (connection as any)._rpcEndpoint;
const regex = /https:\/\/metaplex.([^.]*).rpcpool.com/;
const match = endpoint.match(regex);
if (match[1]) {
if (match && match[1]) {
return match[1];
}
return 'mainnet-beta';
Expand Down

0 comments on commit 861f819

Please sign in to comment.