Browse Source

chore: fix falsy comments edge case in release notes (#16720)

Shelley Vohr 6 years ago
parent
commit
a9991f5451
1 changed files with 1 additions and 3 deletions
  1. 1 3
      script/release-notes/notes.js

+ 1 - 3
script/release-notes/notes.js

@@ -65,9 +65,7 @@ const setPullRequest = (commit, owner, repo, number) => {
 
 const getNoteFromClerk = async (number, owner, repo) => {
   const comments = await getComments(number, owner, repo)
-  if (!comments && !comments.data) {
-    return
-  }
+  if (!comments || !comments.data) return
 
   const CLERK_LOGIN = 'release-clerk[bot]'
   const PERSIST_LEAD = '**Release Notes Persisted**\n\n'