This PR fixes a bug first detected in the build of merging of DPGAlliance/publicgoods-candidates#958 triggered by an empty array in repositories=[]. The code to search for the repo should only run if these two conditionals are met:
L146 if(n.hasOwnProperty('repositories')){
L148 if(n.repositories.length > 1) {
Thus, the match and fetchGithubActivity are moved inside the last conditional above.
Please note that if either of the ifs don't pass, html var defined in L145 is empty, and is assigned as an empty value in L161, which is the desired behavior
This PR fixes a bug first detected in the build of merging of DPGAlliance/publicgoods-candidates#958 triggered by an empty array in
repositories=[]
. The code to search for the repo should only run if these two conditionals are met:if(n.hasOwnProperty('repositories')){
if(n.repositories.length > 1) {
Thus, the
match
andfetchGithubActivity
are moved inside the last conditional above.Please note that if either of the
if
s don't pass,html
var defined in L145 is empty, and is assigned as an empty value in L161, which is the desired behavior