Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: TypeError: Cannot read property 'match' of null #19

Closed
skaematik opened this issue Jan 16, 2020 · 0 comments · Fixed by #31 · May be fixed by greglockwood/pr-train#2
Closed

Bug: TypeError: Cannot read property 'match' of null #19

skaematik opened this issue Jan 16, 2020 · 0 comments · Fixed by #31 · May be fixed by greglockwood/pr-train#2

Comments

@skaematik
Copy link
Contributor

skaematik commented Jan 16, 2020

Sometimes I would get the error message TypeError: Cannot read property 'match' of null. e.g.:

All changes pushed ✅

This will create (or update) PRs for the following branches:
  -> annie/a (x1)
  -> annie/b (x2)
  -> annie/c (x3)

Shall we do this? [y/n]  y

Checking if PR for branch annie/a already exists... yep
Checking if PR for branch annie/b already exists... yep
Checking if PR for branch annie/c already exists... yep
Updating PR for branch annie/a...✅
❌  An error occured. Was there a conflict perhaps?
error TypeError: Cannot read property 'match' of null
    at upsertNavigationInBody (/usr/local/lib/node_modules/git-pr-train/github.js:70:12)
    at allBranches.reduce (/usr/local/lib/node_modules/git-pr-train/github.js:200:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)

I believe the issue is that memo.body can be null.

body: prResponse.body,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant