diff --git a/lib/stableBrandNewReminder.js b/lib/stableBrandNewReminder.js index de8911e67..8cfe6aeff 100644 --- a/lib/stableBrandNewReminder.js +++ b/lib/stableBrandNewReminder.js @@ -15,7 +15,9 @@ async function doIt() { const comments= await getAllComments( issue.number ); let found=false; - let comment = comments.find( c => /created (\d+\.\d+\.\d+)/g.exec(c.body)); + let comment; + + comment = comments.find( c => /created (\d+\.\d+\.\d+)/g.exec(c.body)); if (comment) { const result = /created (\d+)\.(\d+)\.(\d+)/g.exec(comment.body); if (result) { @@ -33,7 +35,7 @@ async function doIt() { found=true; } - let comment = comments.find( c => /reminder (\d+\.\d+\.\d+)/g.exec(c.body)); + comment = comments.find( c => /reminder (\d+\.\d+\.\d+)/g.exec(c.body)); if (comment) { const result = /reminder (\d+)\.(\d+)\.(\d+)/g.exec(comment.body); if (result) {