techgaun / active-forks

Find active github forks of a repo https://git.io/vSnrC
https://techgaun.github.io/active-forks/index.html
2.28k stars 295 forks source link

TypeError: Cannot read property 'login' of null. #49

Closed Womble-1 closed 3 years ago

Womble-1 commented 3 years ago

This might be user error, but i am getting "TypeError: Cannot read property 'login' of null. Additional info in console" when i try and find the active forks for "docbleach/DocBleach" https://github.com/docbleach/DocBleach is it something to do with the target project?

countingpine commented 3 years ago

Stepping through in the Console, one of the forks is apparently https://github.com/m4ta1l/DocBleach, which doesn't seem to load (infinite redirects). The user page https://github.com/m4ta1l just 404's. Perhaps the user has been deleted, but a phantom fork remains.

I guess if the two lines at https://github.com/techgaun/active-forks/blob/master/js/main.js#L50 get wrapped in some sort of if (fork.owner) block, that would fix the problem here.

techgaun commented 3 years ago

Thanks @Womble-1 for opening the issue.. And, @countingpine thanks for looking into this in more detail. I'll add the conditional.. Not sure if such fork should be totally hidden as there may be other use-cases that result to this. In case I can verify (or someone else) that this issue only occurs with phantom forks, I think we should skip the fork at all from being displayed.