From fcd0ffce855c59089179184b6657e8a04071977c Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Sun, 15 Dec 2013 17:23:51 -0800 Subject: [PATCH] Resolves Issue #151 silly assert issue --- src/js/git/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/git/commands.js b/src/js/git/commands.js index c2676020..975bfbd3 100644 --- a/src/js/git/commands.js +++ b/src/js/git/commands.js @@ -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'