heikkipora / gitlab-radiator

The missing GitLab build radiator view
MIT License
16 stars 22 forks source link

TypeError when build.commit is null #21

Closed rjoonas closed 6 years ago

rjoonas commented 6 years ago

I'm running gitlab-radiator against gitlab.com. Some random blip caused build.commit to be null:

TypeError: Cannot read property 'title' of null
   at _.take.map.build (/app/node_modules/gitlab-radiator/src/gitlab.js:49:30)
   at LazyWrapper.lazyValue [as value] (/app/node_modules/lodash/lodash.js:1895:26)
   at baseWrapperValue (/app/node_modules/lodash/lodash.js:4376:25)
   at LodashWrapper.wrapperValue (/app/node_modules/lodash/lodash.js:9067:14)
   at fetch.filter.map.gitlabBuilds (/app/node_modules/gitlab-radiator/src/gitlab.js:52:12)
   at Next.valueF (/app/node_modules/baconjs/dist/Bacon.js:912:14)
   at Next.value (/app/node_modules/baconjs/dist/Bacon.js:901:31)
   at Object.sink (/app/node_modules/baconjs/dist/Bacon.js:2660:38)
   at Dispatcher.pushToSubscriptions (/app/node_modules/baconjs/dist/Bacon.js:1223:23)
   at Dispatcher.pushIt (/app/node_modules/baconjs/dist/Bacon.js:1245:10)

Happens here: https://github.com/heikkipora/gitlab-radiator/blob/b04f3b63ab254ed774cd81db1139f52d7f1746ce/src/gitlab.js#L49

heikkipora commented 6 years ago

Looks like an issue that is fixed in the new v2 release out just now! See https://github.com/heikkipora/gitlab-radiator/releases/tag/2.0.3 Available on www.npmjs.com already.