Resolves Issue #151 silly assert issue

This commit is contained in:
Peter Cottle 2013-12-15 17:23:51 -08:00
parent 45ccb0e2ed
commit fcd0ffce85

View file

@ -48,7 +48,7 @@ var assertNotCheckedOut = function(engine, ref) {
var assertIsBranch = function(engine, ref) {
assertIsRef(engine, ref);
var obj = engine.refs[ref];
if (obj.get('type') !== 'branch') {
if (!obj || obj.get('type') !== 'branch') {
throw new GitError({
msg: intl.todo(
ref + ' is not a branch'