Commit 499b9206 authored by Shawn Tabrizi's avatar Shawn Tabrizi
Browse files

catch undefined error

parent b9e25fd0
......@@ -49,7 +49,7 @@ module.exports = (app) => {
// match "polkadot address: <ADDRESS>"
let addressRegex = /(polkadot|kusama|localtest) address:\s?([a-z0-9]+)/i;
let maybeMatch = pullRequestBody.match(addressRegex);
if (maybeMatch.length != 3) {
if (!maybeMatch || maybeMatch.length != 3) {
problemsText.push(`Contributor did not properly post their Polkadot or Kusama address. Make sure the pull request has: "{network} address: {address}".`);
} else {
network = maybeMatch[1].toLowerCase();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment