fix TypeError: Cannot read property 'git' of undefined