DPGAlliance / publicgoods-scripts

Scripts to generate static site from WordPress
http://digitalpublicgoods.net
MIT License
4 stars 6 forks source link

BUG: fix empty repo list #113

Closed lacabra closed 2 years ago

lacabra commented 2 years ago

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:

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