diff --git a/index.js b/index.js index 80ac51c74..dc6996ca3 100644 --- a/index.js +++ b/index.js @@ -91,7 +91,7 @@ module.exports = (app, { getRouter }) => { } } // check pr body - if (!found && autolabel.body.length > 0) { + if (!found && context.payload.pull_request.body != null && autolabel.body.length > 0) { for (const matcher of autolabel.body) { if (context.payload.pull_request.body.match(matcher)) { labels.add(autolabel.label)