fixed nav bar for empty repos (fixes #4375)

Fixes a regression introduced by 74c8a635ce27336cd385d438291b22e921f88e1c

Closes #4375